This guide explains how to localize an iOS app for multiple languages/marketplaces.
The first step in localizing an app is determining which languages you wish to support. Once this is determined:
Locate the appropriate
In the project build.settings
file, add these language codes to a CFBundleLocalizations
table within the settings
→ iphone
→ plist
settings = { iphone = { plist = { CFBundleLocalizations = { "en", --English "es", --Spanish "it", --Italian "de", --German "fr", --French "ja", --Japanese "ko", --Korean }, }, }, }
CFBundleDisplayName
and CFBundleName
keys as the app defaults (see Project Build Settings for details). Note that these should reside inside the plist
table but outside the CFBundleLocalizations
table.settings = { iphone = { plist = { CFBundleLocalizations = { "en", --English "es", --Spanish "it", --Italian "de", --German "fr", --French "ja", --Japanese "ko", --Korean }, CFBundleDisplayName = "Princess", CFBundleName = "Princess", }, }, }
The second step involves creating a localized project folder for each language in the root project directory alongside main.lua
.
CFBundleLocalizations
table within build.settings
, create a new xx.lproj
folder in the app's root directory, where xx
represents the Each folder must be appended with .lproj
. For instance, the proper folder name for English is en.lproj
, not merely en
.
Each folder must follow en.lproj
, not EN.lproj
.
InfoPlist.strings
:InfoPlist.strings
file, specify both a CFBundleDisplayName
and CFBundleName
line with the proper title for that language, for example:English (en.lproj/InfoPlist.strings
)
CFBundleDisplayName = "Princess"; CFBundleName = "Princess";
Spanish (es.lproj/InfoPlist.strings
)
CFBundleDisplayName = "La princesa"; CFBundleName = "La princesa";
Korean (ko.lproj/InfoPlist.strings
)
CFBundleDisplayName = "공주 패션쇼"; CFBundleName = "공주 패션쇼";
Once the above steps are complete, you can test the bundle names locally to ensure that the localized names appear.
Build the app as outlined in the Build Process section of the Provisioning and Building guide.
Install the app as described under Device Installation in the Provisioning and Building guide.
Change the device language setting via Settings → General → CFBundleDisplayName
in the respective InfoPlist.strings
file.
Changing the device settings must be done entirely at your own risk, especially in regards to language settings. If you change the device language, ensure that you understand the options and menus that will allow you to revert the device to your native language. Solar2D Labs cannot be held responsible for any settings changes that are conducted without reasonable caution.