Updated 19 January 2024
Localization is the process of making your app support multiple languages. In many cases, you make your app with an 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 to 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.
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
3 comments