How do I get localized names of application in python?

Posted by Mystic-Mirage on Ask Ubuntu See other posts from Ask Ubuntu or by Mystic-Mirage
Published on 2012-12-06T21:57:56Z Indexed on 2012/12/06 23:25 UTC
Read the original article Hit count: 265

Filed under:
|

This code gives me only English application name if .desktop file does not have "Name[*]" options (like in totem.desktop) but only "X-Ubuntu-Gettext-Domain: totem":

from gi.repository import Gio
app = Gio.app_info_get_default_for_type('video/x-flv', True)
print app.get_name()

This like code gives me proper result for vlc.desktop.

Ubuntu Dash shows proper localized names for all applications.

How do I get localized names of application in python?

Sorry for my English.

© Ask Ubuntu or respective owner

Related posts about python

Related posts about localization