cocoa touch - Non-English default language for iOS App? -
i developing app client in europe. english-speaker in us. our app going back upwards number of languages, not english. have strings in our app in translated localized.strings files, set correctly different languages, , work fine when device set right language (device's language high german = app correctly localized german).
there problem when device not set 1 of languages support, example, on phone set english. want phone fall high german in cases this, not happening. seeing phone using language appears highest on language list in international section of settings.app. phone, highest non-english language on list french, when run app, localized french. if alter phone high german , english language (which changes order in languages list), app localizes german.
how can ensure app defaults high german non-supported languages? used this tutorial set locales project. includes removing default "english" locale created when first localize file. in project file, i've added:
developmentregion = de;
also, in info.plist, have
<key>cfbundledevelopmentregion</key> <string>de</string>
with no success.
any ideas appreciated!
defaulting particular language not should strive for. suppose japanese user living in french republic , fluently speaking french has phone set japanese. app default german, despite having french translation; guess that's not want , it's not user wants.
for reason suggest respect language prioritization set user.
since don't want back upwards english language have developed app in english, easiest thing can rid of en.lproj
right after compiling. leave app languages plan support, , iphone chose language best suited user, set in iphone's defaults.
there pretty straightforward solution deleting specific localization:
let xcode build app nowadays localizations , before code-signing kicks in delete en.lproj
folder , localized files language gone. can adding run script build phase target, containing 1 line of code (it's bash script):
rm -r "${target_build_dir}/${product_name}.app/en.lproj"
code signing kicks in after build phases have completed, set build phase @ end of current phases.
note increases time build because xcode recreates english language files, might want disable step during testing.
i hope that's viable solution you.
concerning "the app must fall high german in case appropriate localization doesn't exist":
question is appropriate localization? if user's 3rd selection french (after 2 unsupported languages), solution create app fall french, is appropriate localization. more appropriate setting user's 5th choice, german, hand.
what happens when app launches simple: os descends users language list, set in preferences, until finds matching localization, , uses language. reason many apps default english language , not high german because english language appears on user language lists above german. there no inherent language preference system. if delete english language translation, languages want back upwards there, , of these languages 1 higher on user's list taken.
cocoa-touch xcode localization internationalization ios
No comments:
Post a Comment