locale specific for .desktop

Takao Fujiwara - Tokyo S/W Center Takao.Fujiwara at Sun.COM
Tue Oct 23 02:48:06 PDT 2007


Thanks for this help.
It seems this issue could be resolved.

I have two questions.
1. Do you have any recommended directory paths in case you add a new one in $XDG_DATA_DIRS ?
The following is just my idea.
export XDG_DATA_DIRS=/usr/share/locale/$LANG/xdg:/usr/share

2. Can I assume the $XDG_DATA_DIRS have the fall back logic? e.g. if foo1.desktop is found in both /usr/share/applications and /usr/share/translations, /usr/share/translations/applications/foo1.desktop only is choosed. if foo2.desktop is found in /usr/share/applications but not /usr/share/translations, /usr/share/applications/foo2.desktop is choosed.
I'm also finding the way to separate the l10n packages for .desktop.


Frederic Crozat wrote:
> Le lundi 22 octobre 2007 à 23:10 +0900, Takao Fujiwara a écrit :
> 
>>Patryk Zawadzki さんは書きました:
>>
>>>2007/10/22, Takao Fujiwara <Takao.Fujiwara at sun.com>:
>>>
>>>>Patryk Zawadzki さんは書きました:
>>>>
>>>>>Why not fix the application in the first place? You don't have to
>>>>>translate it, just make it work properly.
>>>>
>>>>The application supports one locale. If we support some locales, we need to buy the locale data, then this couldn't be resolved in the software level.
>>>>If we(Sun) say to support a locale, we need to provide the translation.
>>>
>>>No, you just call it "Chinese Dictionary" in the desktop file or "Map
>>>of Japan" or whatever name clearly states the language or locale
>>>involved. No software should ever change the content available to the
>>>user based on the current system locale.
>>>
>>
>>Unfortunatelly it's not expected the application is shown on other locales.
>>The application needs to be shown on a locale only in the menu and I'm finding the resolution.
> 
> 
> Just plug in your startup scripts a modification to XDG_DATA_DIRS and
> move the offending .desktop into a directory which will be used only
> when using specific locale. Or you can add a .menu file which will
> hide .desktop and make sure this file is merged only when locale is set
> (by modifying XDG_CONFIG_DIRS at login time).
> 




More information about the xdg mailing list