Overriding preferred strings localization on the fly for testing

前端 未结 3 927
遥遥无期
遥遥无期 2021-02-06 16:21

Using the Settings app in the iPhone simulator to switch languages is a PITA way of testing localization tweaks. I\'m trying to figure out a way to switch localizations (en/fr/e

3条回答
  •  难免孤独
    2021-02-06 16:52

    The trick to use specific language by selecting it from the app is to force the NSLocalizedString to use specific bundle depending on the selected language ,

    here is the post i have written for this http://learning-ios.blogspot.com/2011/04/advance-localization-in-ios-apps.html

    and here is the code of one sample app https://github.com/object2dot0/Advance-Localization-in-ios-apps

提交回复
热议问题