https://kotlinlang.org logo
Title
v

Vidmantas Kerbelis

02/28/2023, 11:28 AM
In the Moko resources documentation, I’m not seeing a clear documentation on how to specify a full locale for a resource, that is the language code and country code. On Android it would be, as an example:
fr-rCH
,
en-rGB
, and so on. This works well on Android, as it creates the strings in this format:
en-rGB/multiplatform_strings.xml
, it also works quite well on iOS (in some cases needed some workarounds), but it generates the .lproj such as
en-rGB.lrpoj
. This apparently is illegal when trying to upload to iTunes, as it requires a format of
en-GB.lproj
. This is the error that is then shown on iTunes:
"Payload/Your.app/your-app:multiplatform.bundle/Contents/Resources/fr-rCH.lproj",
"Payload/Your.app/your-app:multiplatform.bundle/Contents/Resources/nl-rBE.lproj" ) are invalid. iTunes supports BCP47 but not the UN M.49 specification. Refer to the Language and Locale Designations guide at
Question: how am I to resolve this correctly? I see this PR: https://github.com/icerockdev/moko-resources/pull/356, but it was never merged
a

alex009

03/13/2023, 8:15 AM
at now this request not merged, yes. but it will be
v

Vidmantas Kerbelis

03/13/2023, 8:17 AM
All right, as we stand now, the solution is to make a build script after the files are generated to rename them into appropriate iOS supported ones. So, not the best solution by far 😞