Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2563] Android: region-specific i18n files need to be copied to res with "r" in front of region

GitHub Issuen/a
Resolution Date2011-04-17T01:59:27.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M02
Labelsandroid, defect, release-1.6.0
ReporterBill Dawson
AssigneeBill Dawson


Yourproject/i18n/pt-PT/strings.xml works fine for iOS, but when built for Android it causes a build error:

[ERROR] invalid resource directory name: /Users/bill/projects/ti/Strings/build/android/res/values-pt-BR
[ERROR] Error generating R.java from manifest

Reason is because in android it needs to be values-pt-rBR (the little 'r' before BR). See Language and Region section of Android's http://developer.android.com/guide/topics/resources/providing-resources.html"> Providing Resources doc.




  1. Bill Dawson 2011-04-15

    To QA,

    For testing, the attached ZIP file contains a project you can import. It has the i18n directory that we use for localized strings, and one of the subfolders there is fr-BE, for belgian french. In the failing versions of the sdk, if you try to build it you'll get an error about that folder being a bad name. In the fixed version, it should build without problem.

  2. Bill Dawson 2011-04-15

    (from [34d7f80a2a35d83721ef6bbdb932b3a26be472b2]) [#2563 state:fixed-in-qa] For i18n folders with region-specifications, like fr-BE, make sure the file copied to Android's res folder gets an 'r' in front of the region. https://github.com/appcelerator/titanium_mobile/commit/34d7f80a2a35d83721ef6bbdb932b3a26be472b2"> https://github.com/appcelerator/titanium_mobile/commit/34d7f80a2a35...

  3. Thomas Huelbert 2011-04-15

    built without an issue for 1.6 and 2.2.1, Do not have device with belgian french available though. itanium SDK version: 1.6.0 (01/04/11 08:01 e49700d)

  4. Brian Burgess 2014-01-26

    this is happening again in 3.2.0 .. at least when I am trying with 'zh-TW'.
  5. André Coelho 2014-05-24

    Brian is right, this is happening again. I have an i18n folder with an en and pt-PT folder and it works when I deploy on iOS, if I deploy an Android it aborts the build with an error. if I change to pt-rPT it works on Android but then when I deploy on iOS it won't work, falling back to en strings.xml values, even though the system language is pt-PT. Please fix this, it is a major inconvenience for app localisation.

JSON Source