Bob.Tern
Posts: 14
Joined: Wed Nov 15, 2023 7:02 am

I would like to localize property list values

I would like to localize property list values according to the following document:
https://developer.apple.com/library/arc ... Files.html

How can I do it in the Appery.io environment?
aantsypau
Posts: 28
Joined: Wed May 24, 2023 7:57 am

Re: I would like to localize property list values

In case if you would need to modify -Info.plist file you can do this using cordova-custom-config plugin

image.png

Add code like this

<custom-config-file parent="CFBundleLocalizations" target="*-Info.plist" mode="replace">
<array>
<string>en</string>
</array>
</custom-config-file>

Into Cordova config section

image.png

More about cordova-custom-config plugin you can read into their documentation https://github.com/dpa99c/cordova-custom-config

In case if you would need localize application, for example app permission or app name you can use Localization plugin

image.png

more about this plugin you can read into their documentation https://github.com/kelvinhokk/cordova-p ... on-strings

in two words you need
1. Enable Localization cordova plugin

image.png

2. Upload files into CORDOVA_ROOT/translations/app folder

image.png

File should looks like this

{
"config_ios": {
"NSCameraUsageDescription": "Take pictures",
"CFBundleDisplayName": "Some App Name",
"CFBundleName": "Some App Name"
},
"config_android": {
"app_name": "Some App Name"
},
"app": {
"HAVE_MAIL_TITLE": "You have mail.",
"HAVE_MAIL_MSG": "%1$@ has you a message titled \\\"%2$@\\\""
}
}
Attachments
image (6).png
image (6).png (40.92 KiB) Viewed 9891 times
image (5).png
image (5).png (104.33 KiB) Viewed 9891 times
image (4).png
image (4).png (100.95 KiB) Viewed 9891 times
image (3).png
image (3).png (69.4 KiB) Viewed 9891 times
image (2).png
image (2).png (101.23 KiB) Viewed 9891 times

Return to “Issues”