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.
Related
I am having a strange bug where in iOS is picking up the second preferred language on the phone as the main language and showing the strings in that language. I use react-native and it started to happen after I upgraded to 0.64.0. For example, in the below screenshot, the month strings are shown in Hindi. Hindi is the second preferred language on the phone.
The Cancel and Select buttons are added by JS side code which appears fine in English language. After I removed Hindi as the second preferred language leaving only English as the phone language, the month string started to appear in Spanish.
I am not sure what is triggering it and how to fix this problem. Any kind of help is much appreciated. I provide Hindi and Spanish translations for the app and have InfoPlist.strings file present for Hindi and Spanish in the app. If I remove those string files, then the strings are shown in English as expected.
Please note that the problem is not limited to the date picker. It is for any of the dialogs shown by iOS. For example, if I select any text, the copy label appears in Spanish. I have attached some other screenshots where the problem can be seen.
Open the Settings app.
Navigate to a--name > Preferred Language > Language.
Change the preferred language to Spanish.
also try setting the preferred language to just English and forget the Hindi and let us know what happens. also good chance this might fix you up:https://github.com/formatjs/formatjs
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.
I have an application that must support two languages: english and french.
English is the Development Language and I also added French.
I have three children below the Main.storyboard: Main.storyboard(Base), Main.storyboard(English) and Main.storyboard(French). Unfortunately the Main.storyboard(Base) has the texts in french and my English file is ignored.
How can I fix this? I struggle already for 2 hours. When I run the application all the texts are in french tough the device language is english.
I tried to change all the strings in the base storyboard to be in english but after that some of the french texts from Main.storyboard(french) are ignored. It driving me nuts.
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.