简体   繁体   中英

Localized strings using Storyboard

It's the first time I use a storyboard, and I have some questions about Localized strings.

Indeed, before, I had a file "localized.string" in each directory fr.lproj, en.lproj, etc. And I used my own key to identify each component:

button_one = @"Button One"; (en.lproj) button_one = @"Bouton Un"; (fr.lproj)

etc...

Here, I have a file Main.string which contains the object id of my component, but I can't change the object id with my own key like before. You know What I mean ?

And to change language, I made my own class which use the right localizable.string file when preferred language of the app changed.

Well, my question is: How can use the localization in this way or how should I use it ?

Thank you for you explanation!

EDIT: I found what I want: https://conyac.cc/business/columns/localization_guide_ios

That is a good guide for localization. From your description, you may have named your .strings file incorrectly. When you create the initial file, it should be named Localizable.strings, and it should be placed in your origin language folder (eg en.lproj).

Check out our app which can create 40+ Localizable.strings and InfoPlist.strings files for you (including the translations). https://itunes.apple.com/app/generate-localizable-strings/id572287184?mt=12

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM