Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Info: How to change language (e.g. Back, Cancel) in standard-controls in iOS?

$
0
0

Hi all

I’m coming from Switzerland and therefore, our app addresses the Swiss German market marked.
As all the standard-text (only in iOS) (e.g. “Back” in page header instead “Zurück”, “Done” in Picker instead of “Fertig”) was displayed in English (not in the device-language, which is German) I have filled in a bug in bugzilla (the bug was confirmed then).

Now, @CraigDunn‌ have answered to the bug in bugzilla.
Thanks for that.

As I think this is a very important information for all XF-developers that don’t target only English devices/users, I post the information’s here.

You have to manually edit the info.plist-file in your iOS-Project (loacated in the root).
As it seems, that there are no CR-LF’s in the file, you should use a special editor (like Editpad lite, link: editpadlite.com/) to edit the file.

Add the following lines in the file:

    <key>CFBundleLocalizations</key>
    <array>
        <string>de</string>
        <string>es</string>
        <string>fr</string>
        <string>ja</string>
        <string>pt-BR</string>
        <string>ru</string>
        <string>zh-Hans</string>
        <string>zh-Hant</string>
    </array>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>

Note: mabye you have to change the strings to your needed language.

I have done this and … it works (“Back” now = “Zurück”).

So.. once again thanks to craig.

But… I really wonder, that this is not included by default or can be changed over the project-settings (as this is very important for every foreign language.

Hope, this helps somebody...

Fredy


Viewing all articles
Browse latest Browse all 89864

Trending Articles