The Following User Says Thank You to amandalam For This Useful Post: | ||
![]() |
2010-06-22
, 18:46
|
Posts: 85 |
Thanked: 383 times |
Joined on Jan 2010
@ Hong Kong
|
#2
|
[Desktop Entry] Encoding=UTF-8 Version=0.1 Name=MyAppName Comment=My App Exec=python /opt/MyApp/MyApp.py Icon=MyApp Type=Application X-HildonDesk-ShowInToolbar=true X-Text-Domain=MyApp
msgid "" msgstr "" "Project-Id-Version: MyApp\n" "Report-Msgid-Bugs-To: my-email@my-email.com\n" "POT-Creation-Date: 2010.05.16 14:11+0300\n" "PO-Revision-Date: 2010-06-21 12:26+0800\n" "Last-Translator: My Name <my-email@my-email.com>n" "Language-Team: en_US\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1\n" msgid "MyAppName" msgstr "好程式"
msgfmt zh_HK.po -o /usr/share/locale/zh_HK/LC_MESSAGES/MyApp.mo
/usr/share/icons/hicolor/48x48/apps/MyApp,png (48x48) /usr/share/icons/hicolor/scalable/hildon/MyApp.png (64x64)
I'm currently in the process of creating an application targeted for the Chinese communities. While it is possible to create localized UIs via *.po/*.mo as well as control file for packaging, I cannot find a way to display the localized name of the application in the application icon based on current system language.
I've read through the wiki page and it doesn't mention anything about localization. It does provide a freedesktop.org link for further reading and the freedesktop.org spec does mention something related. I then tried to modify the .desktop file of my app to the format similar to the following:
Name=MyApp Name in English
Name[zh_HK]=我的軟件 (MyApp Name in Chinese)
and reboot the device; but the application name in MyApp's icon is still the English one
I've checked for the .desktop files of the system's bundled programs (e.g. Image Viewer) and found that the values in their "Name" field are in fact some "keys" (e.g. "imag_ap_images") that are referred by some *.mo files in /usr/share/locale/{lang}/LC_MESSAGES/ . So I wonder:
I'm just a novice developer in the Maemo world and I'm looking forward to learning from you guys.