Check Mobile App
Read now

How to Localize the Plist file?

Save

Localize Plist file.

Localization is the process of making your app support multiple languages. In many cases, you make your app with English user interface first and then localize the app to other languages such as Arabic. Today I am going to show how to localize the permission text.

Please follow the below steps to localize the Plist file:

Step 1: Add the language in you your project.

Select project -> Select localizations->Add language

Step 2: Add a new string file and name it “InfoPlist.strings”.

Step 3: Select “InfoPlist.strings” and on the right side click on ” localize ” this and select the respective language whatever present in your project.

Step 4: Then it will create the file for the base, English, and respective language.

Step 5: Now localize the Plist key description.

for the English file:

NSAppleMusicUsageDescription = “Uses for music”;

NSCameraUsageDescription = “Uses the camera for taking profile picture and image detection”;

NSLocationAlwaysAndWhenInUseUsageDescription = “Uses location for getting user current address”;

NSLocationAlwaysUsageDescription = “Uses location for getting user current address”;

NSLocationUsageDescription = “Uses location for getting user current address”;

NSLocationWhenInUseUsageDescription = “Uses location for getting user current address”;

NSPhotoLibraryUsageDescription = “Uses photo for taking profile picture and image detection”;

for Arabic file:

NSAppleMusicUsageDescription = “يستخدم للموسيقى”;

NSCameraUsageDescription = “يستخدم الكاميرا لالتقاط صورة الملف الشخصي واكتشاف الصورة”;

NSLocationAlwaysAndWhenInUseUsageDescription = “يستخدم الموقع للحصول على عنوان المستخدم الحالي”;

NSLocationAlwaysUsageDescription = “يستخدم الموقع للحصول على عنوان المستخدم الحالي”;

NSLocationUsageDescription = “يستخدم الموقع للحصول على عنوان المستخدم الحالي”;

NSLocationWhenInUseUsageDescription = “يستخدم الموقع للحصول على عنوان المستخدم الحالي”;

NSPhotoLibraryUsageDescription = “يستخدم الصورة لالتقاط صورة الملف الشخصي واكتشاف الصورة”;

We have mentioned the most common keys which we have used in our every project. You can take any key from the Plist file and localize it.

Step 6: Now your Plist file is localized.

Step 7: It depends on your iPhone or iPad ‘s language, it will automatically pick the description from the “InfoPlist.strings”. file.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


3 comments

  • Dmitriy
    Thanks a lot
  • Liming Song
    In Xcode 11.4, localizing Info.plist is just like localizing a storyboard. InfoPlist.strings file is part of the history from now on.
  • Sabari
    Finally I got that exact answer 🙂 , Really very helpful for me… Thanks lot!!!
  • css.php

    Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!

    Deniel Kerr

    Owner and Founder. Opencart

    Talk to Sales
    Start a Project

      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home