Now I have already have a localizable.strings. But when I want to change the app display name to localizable. The Application has localized display name can't find the string from localizable.string. Just when I change the name to InfoPlist.strings,It can works.But the text in application doesn't work. How to resgister the localizalbe.strings's name to the localized display name.
You'll find a useful guide on how to localize your Info.plist file, thus your application name (bundle display name) here.
EDIT after comment:
The InfoPlist.strings is the localisation file for your Info.plist file. You should not change its name.
It is used to localise only the strings inside your Info.plist file.
To localize other strings in your application, you will need another seperate Localizable.strings bundle.
So in your project you would have:
InfoPlist.strings
and
Localizable.strings
There are a number of other useful resources you can read here in relation to internationalization:
http://developer.apple.com/internationalization/
Related
I have small problem, I have changed Bundle Display Name in info.plist to "MyName", but unfortunately in Keyboard Choice Menu it still shows as "MyName — HostAppName". Is that possible to change something to show "MyName" only?
Thanks in advance! And yes I have searched through entire STO to find anything about that :)
I too was wondering how to achieve this, especially after Swiftkey was able to have a single name. To do this both the Bundle display name in both info.plist files must be the same.
The moment they are different then they will display with separated string.
I hope this helps.
You can do that by setting "Bundle Display Name" key with value "My Name" in both info.plist files
info.plist file in your keyboard target
info.plist file of you Application
I understood that I can have localized NSLocationAlwaysUsageDescription text using standard iOS localization mechanism.
Since we are using our custom dynamic localisation mechanism I wonder if there is another way to translate that string.
I thought of editing application info.plist file on app start, but it seems to be read only.
Can I change this value from withing the app?
There is a way. Add a new Strings file called "InfoPlist". Then localize it using a Localize button in attributes inspector and add localizations to the InfoPlist's keys. To localize CLLocation premission's description add in every version proper key and loacalised value.
//English file
"NSLocationAlwaysUsageDescription" = "English description";
_
//Polish file
"NSLocationAlwaysUsageDescription" = "Polski opis";
There's no way to use a custom localisation system with the info.plist strings.
That part of your app will have to use iOS's default localisation mechanism.
This is how to localise the location request description with iOS's built in strings file localisation system.
// English.strings file
"NSLocationAlwaysUsageDescription" = "English description";
// AnotherLanguage.strings
"NSLocationAlwaysUsageDescription" = "ajbdknfuied wibnrf";
EDIT: At everyone down voting me. The question asked about using a custom "custom localisation system". They explicitly said they did not want to use the built in localisation system, but instead their own custom one. That is why I said it was impossible.
Localising NSLocationAlwaysUsageDescription is completely possible. Using your own custom localisation system to do it is not.
I tried using the answers above, but had no luck until I used the information in this much more helpful thread.
Any one help me at runtime, How to load key message value in Localizable.strings file objective C?
No way to do this.
Currently iOS supports the localized (.strings) files from Bundle. Bundle is read-only, so you can't change it's content.
Your requirement is possible if the localized (.strings) file is writable, for that it should be in document directory. But currently there is no way to read localized (.strings) files from document directory.
I don't know whether it can be a alternative for your solution or not: You can use NSLocalizedStringFromTableInBundle() for reading the localized content from other bundle.
I'm localizing my iOS app and having difficulty translating strings in the mergSettings extension for LiveCode. I setup a new folder - ja.lproj. Then, I made a new file called "Localizable.strings" inside of that folder. I then created "key" = "value"; pairs. I loaded the app and the strings were not translated.
Any ideas on what to try next? Monte?
The settings bundle has it's own localized resources folders so ja.lproj needs to be inside Settings.bundle. Also I'm assuming when you loaded the app the locale was set to ja?
EDIT
The file should be named Root.strings
I wrote a game with cocos2d and translated all the image and text in the
game in two different language.
When the app launches, I load different resource according to the locale of
the device and this worked all OK.
Then when I upload this app for review, I first named it say "test".
Then in the localization part I add a language "Japanese".
But I found that in the "Japanese meta data part", I can edit a lot of
things except the "app name" which is "test". But I want my app to show
different names according to the locale of the device also.
Can somebody tell me how to get this work? Thanks in advance...
You can create a file called InfoPlist.strings in each of your language specific directories, and set a language specific value for CFBundleDisplayName.