Hi, On Mon, Jan 24, 2011 at 11:52 AM, Gökçen Eraslan <gok...@pardus.org.tr> wrote: > Hello, > > In a program we wrote, we use polkit_action_description_get_description and > polkit_action_description_get_message functions of polkit to display > information about actions. But we always see action messages and description > in English even if actions have translations in other languages. (We also use > setlocale to set the locale according to the environmetn variables.) > > As far as I can see, the only thing about localization in the API is the > locale parameter of polkit_authority_register_authentication_agent function. > But since the application we write is not actually an agent, I think this is > not suitable for us. > > Is there any way to get localized action message and descriptions for > applications those are not agents?
The D-Bus API takes the locale as a parameter: http://hal.freedesktop.org/docs/polkit/eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html#eggdbus-method-org.freedesktop.PolicyKit1.Authority.EnumerateActions You can verify that it works by calling this method like this $ gdbus call --system --dest org.freedesktop.PolicyKit1 --object-path /org/freedesktop/PolicyKit1/Authority --method org.freedesktop.PolicyKit1.Authority.EnumerateActions da_DK However the GObject API passes the empty string for the locale http://cgit.freedesktop.org/PolicyKit/tree/src/polkit/polkitauthority.c#n645 We should probably change the GObject API to pass getenv("LANG") if non-NULL or something. David _______________________________________________ polkit-devel mailing list polkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/polkit-devel