pt-BR - Device
Multilingual Language Codes
pt & pt-BR
There is one issue in iOS about portuguese codes. iOS returns either pt or pt-BR. pt-BR is for Brasil. To handle both pt and pt-BR, Kwik4 added the following codes inside. Please keep using pt instead of pt-BR
if defLang == "pt-BR" then _K.lang = "pt" end
OS language Code
To check what language code returned from a device, create a variable from Project and Pages.
Add Varible window, Name the variable as userLang and set the value as _K.lang. The content is Formula/Boolean is selected.
- Content: Formula/Boolean
In page1, langTxt layer is replaced with Dynamic text replacement.
Set the associated variable to userLang
Publish and Device build
Publish and check the behaviors in Corona Simulator
Build the app for device. The language setting in iPhone/iPad/Android will be displayed in langTxt layer. The following screen shot displays ‘ja’