Localized App Name for Xamarin.iOS

I'm working on Multi Lingual App. I'm able to change my App name to it's device default language but unable to do the same in iOS. I have found https://stackoverflow.com/questions/18272855/how-to-get-localized-cfbundledisplayname-with-xamarin and I tried but nothing works fine for me.

Any help will be appreciated.

Tagged:

Best Answer

  • MohammedDastagirMohammedDastagir US ✭✭
    edited September 2018 Accepted Answer

    Finally, I found my solution. The thing is that we have to enter CFBundleLocalizations in Info.plist as follows.

                           <key>CFBundleLocalizations</key>
                            <array>
                             <string>ar</string>
                            </array>
    

    String file name must be InfoPlist.strings.

    Hope it helps to those who are looking for this solution.
    Happy coding

Answers

  • ColeXColeX Member, Xamarin Team Xamurai

    Check https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/localization/text?tabs=vswin#app-name

    iOS uses a naming standard called Localization Projects or .lproj directories to contain image and string resources. These directories can contain localized versions of images used in the app, and also the InfoPlist.strings file that can be used to localize the app name.

    Sample here :https://developer.xamarin.com/samples/xamarin-forms/UsingResxLocalization/

  • @ColeX Thanks for replying.I have understood the concept and already followed it but it's not working. I might be missing something. I want to ask that I'm giving localised folder name for Arabic as ar.lproj. Is it right? Under that folder, InfoPList.strings folder is exist and I'm giving "CFBundleName"="Arabic App Name";

    I also have one more thing to ask that in Main Info.plist, does we need to mention anything in CFBundleName?

  • MohammedDastagirMohammedDastagir USMember ✭✭
    edited September 2018 Accepted Answer

    Finally, I found my solution. The thing is that we have to enter CFBundleLocalizations in Info.plist as follows.

                           <key>CFBundleLocalizations</key>
                            <array>
                             <string>ar</string>
                            </array>
    

    String file name must be InfoPlist.strings.

    Hope it helps to those who are looking for this solution.
    Happy coding

  • teapengteapeng USMember ✭✭

    @MohammedDastagir said:
    Finally, I found my solution. The thing is that we have to enter CFBundleLocalizations in Info.plist as follows.

                         <key>CFBundleLocalizations</key>
                          <array>
                           <string>ar</string>
                          </array>
    

    String file name must be InfoPlist.strings.

    Hope it helps to those who are looking for this solution.
    Happy coding

    You saved my day! Been digging here and there for so long.. Xamarin has to expose this setting on the UI as well. Cheers

Sign In or Register to comment.