I tried to Localized my app English to French but i've Trouble the problem,i Converted into Strings English to French Language here the Below Screen Shots About English And French.
French Language
but i didn't Get response in my app can you please suggest me,any changes....!
Finally I found the way to Localization.
Make the Localized Strings follow the Below Steps
First we select the language into editor area
2.then after we choose the different languages.
3.Next Click the Use Base INternationalization
Now,Click the Finish button.
4.The next step Localize the our Xib files like this
5.Then,covert to the Xib files to localizedStrings
finally get the Localized strings like
6.And add the one file into our project i.e
Click Next and Save the file name Localized.
7.Now Localized.Strings file add to localize languages
Final step is Go to Click the Product->Scheme->New Scheme
And Select the AppleLanguages
and what we want change language called like this code
Finally i found the how to Localization.
Related
I'm trying to account for both English and Georgian and an app I'm developing. I had added the localization language to the project, have all the storyboard languages setup and the strings files.
I now want to test to see if the text translates correctly.
However, when I go to Edit Scheme and find the application language drop down it doesn't have Georgian.
When I added the localization in the project settings I could go to a More menu that had LOADS of languages. Why does this not exist in the Application Language drop down in the scheme settings?
EDIT:
Tried the solution below by adding language and locale as arguments:
I have what I believe is the correct setup for translating strings depending on the language of the phone etc.
The Xcode scheme Debug options only include a subset of languages plus pseudolanguages for testing. However, there are workarounds.
If you want to see if text translates correctly, do one of the following:
Go to your scheme's Arguments tab and add the AppleLanguages and AppleLocale to the "Arguments Passed On Launch" section.
For example, to select the Georgian language and the Georgian region, you'd add:
-AppleLanguages "(ka-GE)"
-AppleLocale "GEO"
or:
On the device or simulator, set the region and language in the device's Preferences and then run your app.
More here: Internationalization and Localization Guide
Note that the ISO language code for Georgia is "ka-GE", not "ge". You should have "ka-GE.lproj" as your localization folder name.
The language code comes from the ISO codes here: ISO 639-2 codes, and the region code comes from these: ISO_3166-2 codes
One other thing I just noticed is that your string translation files are called "Localize.strings". The default filename is "Localizable.strings" and if you're calling NSLocalizedString without providing an explicit file name in the optional table parameter, that's what iOS looks for. So, you'll probably need to rename your translation files for things to work.
The problem my IOS app is facing is that all texts, titles, labels to be translated automatically in the Storyboard are not. At the same time, all texts, titles, labels to be translated by my Swift code, using NSLocalizableStrings are working well.
Here is my environment :
Xcode v 9.4.1
Development Language : English
Localization, English - 6 files localized
Development Language : French - 2 files localized (this line is below the other, correct ?)
Main.Storyboard includes:
Main.Storyboard (Base)
Main.strings (English), which contains all translations in English
The .strings files are correct and contains the translations for NSLocalizable functions
I have done Export for Localization to get an en.xliff file
In the file, it says source=fr and target=en, which is good
I have translated labels, titles, texts, etc in the en .xliff file
I have done Import for Localization using the en .xliff file
To test localization, I do Edit Scheme / Run, with Application Language set to English and Application Region set to System Region
What I see :
Whatever the view, all texts to be translated by a NSLocalizableString function in the Swift code are correctly translated and displayed as expected. Good
But, all texts to be translated automatically by the Storyboard are still displayed in French. All of them (View Title, Button, Label, etc). It looks like the Main.strings (English) is not read at all.
This last part is supposed to be straight forward, isn’t it ?
I have removed three times English and redo the full Localization process, with no effect.
My backup solution is to move all translations into the Swift code and not take advantage of the Storyboard automated translations, but honestly this is not exciting.
Any clue ? Any help ?
Many thanks
Problem:
If you create Localization StoryBoard. and after that you will add some label or button then That will not available in Localization storyboard.
Solution:
Delete complete Localization Story(< YourStoryBoardName >.String) from project. Don't remove only refrence.
Open en.lproj> < YourStoryBoardName >.String And Delete. Do this for other language also This Then again create this you will find all button and label in Localization
Important Note:
By deleting your All localization String will delete So do the backup
first.
Following Ray Wenderlich tutorial (https://www.raywenderlich.com/180356/ios-internationalization), the Localizable.strings is as following. Notice there is no Localizable.strings(Base)
But in some other tutorials, they would use Base instead of English, so did I in my project as follow.
My iPhone's preferred language order is English then Chinese and is currently set to English. But whenever I run the app, it goes to Chinese except when I explicitly edit scheme to ask Xcode to run it in English. Does that mean I should have Localizable.strings (English) instead of Localizable.strings (Base)?
Another question, I have Main.storyboard (Base) and Main.strings (Chinese (Simplified)) under Main.storyboard. But no matter what I do, the storyboard always shows up in Chinese version. What have I done wrong?
=== Update ===
I played around with it (simply remove and recreate, nothing changed), and then magically the localization works as expected: The app default to English, which is my system language, and switches to Chinese when I edit scheme. However, now my storyboard is stuck with (Base) version no matter what I do.
I am no expert on this, but as I understand the Base file is a fallback if your app doesn't have a Localizable.strings file for the user's device language.
So if you have English and Chinese as localization files, but your preferred languages are German and Japanese, the system will check the Base file for strings.
In your case you have Chinese and the base files. English is not found, so it takes the other preferred language (Chinese). Therefore the base strings are not used -- the app defaults to the Chinese localization.
To solve the problem, you need to make an English strings file in addition to your base strings.
In info settings my IOS project I try to add languages for localizations app, but see just Chinese, English, French, German, Italian, Japanese and Korean. How to add other languages?
I have tried this successfully using other way, dont know if this is helpful for you .
I have created resource file with for desired language . That was basically a JSON file with key as some key and value as its translated version.Then as per the setting fetched the desired json from the resource and rendered the value against key .
Needs select project in Xcode's file navigator, not the target (it is my error), and that the Info panel is highlighted blue.
Hi i dont seem to have a problem with doing localization it has worked fine in other apps, however this app is doing something quite funky.
It localizes fine to french , or other languages, but not the base language english in that regard the label is left empy any ideas why that could be the case?
Solved my own problem..lol
I had go to the main project window click on the minus sign remove english localization and then click + and add english , as it had not localized the storyboard for English, this i could see by how it had localized 2 files where the other languages had localized 3.