I'm making use of the InAppSettingsKit within my app, however I'm planning on adding localization to it. I was wondering if there's any support for localization of the settings when using the InAppSettingsKit.
I have had a look around online and haven't had much luck so far. I'm guessing that it will be something to do with Settings.bundle however I'm not sure what to do. Please can someone help me out?
I have subfolders in my Settings.bundle, one per language, called en.lproj, de.lproj and so on. Each subfolder contains a Root.strings file which contains the localised strings. It's working for me so far.
So, the English Root.strings files has lines like:
// Root.strings (en)
"TITLE" = "My Localised Title"; // TITLE goes into a title field in your Root.plist
I forget whether it was possible to add the subfolders in XCode. In any case, you can definitely do that by manually editing the Settings.bundle contents in Finder.
Hope that helps.
Related
My app is currently localized for English and Japanese, with seperate storyboards for each. I want to switch to base localization so that I only have to maintain a single storyboard. I've checked the "Use Base Internationalization" box in the project's info tab and chosen the English iPhone and iPad storyboards for the base.
I assume I should delete the Japanese iPhone and iPad storyboards I had previously used, but I don't see an option to delete them when right-clicking on their files in the file inspector. Should I delete these old storyboards, and, if so, how?
** Edit **
Changing the 'Main Interface' shown in the screenshot doesn't allow me to delete the Japanese storyboard. It's hard to tell which storyboard to select in the dropdown because its width is more narrow than the storyboard names, but that's a separate issue.
This tutorial drives you through the process step-by-step. This is how it worked for me:
Remove all localizations and leave only the base.
Ensure that the localized files were moved from the project directory (in Finder)
Add the localizations one-by-one
The localized strings are extracted from the storyboard only when the localization is created. The Tutorial above provides a script that can help you keeping the localized files up to date if the storyboard is changed.
In your case, you will have to merge the existing translations into the new files but I suppose it is not a huge deal compared to the gain with using a single file.
For reference, the process is described in this official tutorial too: http://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOS/chapters/InternationalizeYourApp/InternationalizeYourApp/InternationalizeYourApp.html
After cleaning and reloading, I was able to remove the Japanese storyboards by clicking on the - in the project settings:
I am trying to add the localization for Tagalog (Philippines) which is listed as tl here for its country code, but it's not in Xcode 4.5's big list of languages. So how do I add it?
If I just add the tl.lproj folder to my code, will it just work even though it doesn't show up in the list of Localizations? Or should I add it somewhere else, too?
Simply put content (such as Localizable.strings) in a tl.lproj folder in your project's directory then add that content to your project.
If you search for Tagalog in Settings > General > Language & Region > iPhone Language it's not there even in iOS 9. Same for Kurdish and Flemish. So why would manually adding the tl.proj work if users can't even select those languages?
If Xcode doesn't list it, it's probably for a reason...
I build a project using XCode 4 and I was running on the simulator since now. I had noticed that the strings in System type "Edit" and "Save" buttons where in english, but everything in my simulator was set to french. I suspected a bug like the one I had in XCode 3.
But now I'm running on my pure french configured iPhone, and those buttons are still in english, and are not localised as in other apps I can use.
I noticed that in my info.plist, the "Localization native development region" was set to "en" by default. I've changed this to "Fr" or "France" in the drop down menu, but that does not chage anything.
How may I correct this to make those buttons show a localized title ?
I had basically the same question, but Black Frog's answer didn't really help me. I did some research and this is what I found out:
The localization is primarily based on the bundle. With info.plist you can add localizations that aren't in the bundle, but you can't remove localizations that are present in the bundle.
The preferred way to add a French localization in Xcode 4 is to do the following:
Open project in Xcode >= 4.0.2
Click on project file
Select item under Project title on the right
Check Localizations table.
Select the localization you want to duplicate (English)
Click + and select the language you want you're app to use (French)
If you don't wan't to support English there are two additional steps:
Select the localization you want to remove (English)
Click - and delete the files
Special thanks to Nekto who helped me figure this out.
You have to create localized version of your nib files. Or you can set the text of each button/label to a localized string in view load.
I have an app that is localized in two languages. I'm trying to change the bundle display name according to the selected localization.
In many articles on the Internet, this is done localizing the info plist file.
I'm using XCode 4 and it automatically creates a MyProject-Info.plist file containing the bundle display name.
As soon as I try to localize it (even having only the first language added) I cannot build the app anymore, cause the Identifier field in the "Summary -> iOS Application Target" section in the project properties becomes blank (and I cannot edit it).
What happens in the file structure of the project is that the original MyProject-Info.plist files is moved to the en.lproj folder, as well as duplicated into the other *.lproj folders I have (one for each supported language).
Any hint?
1.select "InfoPlist.strings" file
2.Open “File Inspector"
3.add your localization language at Localization Section.
4.Open "InfoPlist.strings(English)" file, add CFBundleDisplayName = "Yours English Application Display Name";
5.Open "InfoPlist.strings(your local language)" file, add CFBundleDisplayName = "Yours Local Application Display Name";
Taking the risk of being redundant, let me just clarify (as I've tested this right now) that the trick is to translate the InfoPlist.strings and never the MyProject-Info.plist.
I am working on an iPhone project which I have translated to two languages : French and Spanish.
The issue I have is just with one file : the RootViewController nib.
I localized the MainWindow.nib, and it works (when I change the language, the text in the app changes according to what I specified). I also have several NSLocalizedStrings, with a Localizable.strings file, which also works, but this RootViewController doesn't:
I made the file localizable, added two languages (fr and es), which I modified, the files are located in the fr.lproj folder and es.lproj folder, and they are included in the Target/App/"Copy Bundle Ressources".
The text in the app is always the one from the English nib, even when I change the language.
Any idea where this would come from?
Is your English xib in the en.lproj folder side by side with the other languages? If your english xib is in the root, it may just be finding that and not looking elsewhere.
I've got the exact same problem, but with English & Spanish
The answer is in this question.
I've just cleaned all targets and all is fine now.