2015年6月2日 星期二

[Corona SDK] How to localize your APP title - iOS part

In [Corona SDK] How to support multi-language (localize your APP),
we know how to support multi-languages.
However, the method mentioned above only worked when the APP has been started.
How about the APP title?
Can we solve this problem before the APP start?

Let's check how should we do for iOS first....
Assume that we want to support English and Spanish.
We need to modify build.settings as follow:
iphone =
{
 plist =
 {
     CFBundleLocalizations={
            "en",
            "es",
      },
      CFBundleDisplayName = "myAppTitle",
      CFBundleName = "myAppTitle"",
    }
 }
After that, we need to add some folders for those languages we want to support.
For example, we will add folder "en.lproj" and "es.lproj" for our case.
In the folders we just added, we all need to add  one file "InfoPlist.strings",
In  "InfoPlist.strings", we need to add:
"CFBundleDisplayName"="myAppTitle";
"CFBundleName"="myAppTitle";
The above example is for "en.lproj".
Other languages are similar.

沒有留言:

張貼留言