Undocumented feature of localization?

You must Login before you can answer or comment on any questions.

Today I encounter some interesting feature of the localized application building process. I tried to build the test application for the android platform with en and ru localized string and wanted to have localized app name. I followed to the help system recommendation that is I created the folders with the files as it was described in the help.

platform
  res
     android
       values-en
          string.xml
       values-ru
          string.xml
       AndroidManifest.xml
In strings.xml placed in the folder named values-en I defined such string <string name="app_name">Application name</string> I placed also localized string in values-ru/strings.xml and replaced the label attribute for <application> and <activity> tags in AndroidManifest.xml . Additionally, as it is defined in the documentation, I created the folder i18n with folders and files that contains localized strings for the UI element captions. These files not contains app_name. Then I built the application and ran it on emulator. I observe that the application name is the full activity classname instead to be the localized name as I defined in platform/res/android/values-ru/strings.xml. I look at the content of build/android/res/values-ru/strings.xml and see that this file contains the strings from strings.xml placed into i18n/ru but not from platform/res.. /ru. I leaved AndroidManifest.xml but removed all other files and folders from the folder platform/res/android and added localized string for "app_name" into i18n/ru/strings.xml. Now it works fine and I see localized app name in the emulator.

1 Answer

maybe you should take a look at this http://docs.appcelerator.com/titanium/2.1/index.html#!/guide/Internationalization-section-29004892_Internationalization-Internationalizingtheapp%27sname

— answered 9 months ago by Markus Wutzler
answer permalink
1 Comment
  • Thank You Markus for your answer, but what you say about this http://docs.appcelerator.com/titanium/2.1/images/download/attachments/29004892/Screen_Shot_2012_02_17_at_6_52_44_PM.png. And how should I understand this phrase "In its current state, Android app name localization is a little more involved. First, we need to create language-specific resource folders explicitly for Android. To do so, we will create the platform/android/res/values-(language code) directory structure, like this:" Really I don't need create this folder structure at all. Instead I need worry about folder i18n and it's content only.

    — commented 9 months ago by Vladimir Gaidukov

Your Answer

Think you can help? Login to answer this question!