Comments (4)
What do you think if we add an optional locale in the json file to support locales with region? The idea, is instead of reading the locale from the file name (by default), the plugin will check for the locale.ios or locale.json.
zh-Hans.json
{
"locale": {
"ios": ["zh-Hans"],
"android": ["zh-rCN"]
},
"config_ios": {
"NSCameraUsageDescription": "扫描二维码",
"CFBundleDisplayName": "应用程序名称",
"CFBundleName": "应用程序名称"
},
"config_android": {
"app_name": "应用程序名称"
},
"app": {
"HAVE_MAIL_TITLE": "你收到了邮件",
"HAVE_MAIL_MSG": "%1$@给您发送了封邮件,标题为\\\"%2$@\\\""
}
}
zh-Hant.json
{
"locale": {
"ios": ["zh-Hant"],
"android": ["zh-rTW", "zh-rHK"]
},
"config_ios": {
"NSCameraUsageDescription": "掃描二維碼",
"CFBundleDisplayName": "應用程序名稱",
"CFBundleName": "應用程序名稱"
},
"config_android": {
"app_name": "應用程序名稱"
},
"app": {
"HAVE_MAIL_TITLE": "你收到了郵件",
"HAVE_MAIL_MSG": "%1$@給您發送了封郵件,標題為\\\"%2$@\\\""
}
}
from cordova-plugin-localization-strings.
Sorry for the delay in response, this sounds like it would work perfectly for us!
from cordova-plugin-localization-strings.
Hi rdantonio, I have just added support for this in version 1.1.0
Would you like to try it out?
from cordova-plugin-localization-strings.
Finally had a chance to test this out - it works great! Thank you for the effort!
from cordova-plugin-localization-strings.
Related Issues (20)
- What is the default language if there are 2 languages specified HOT 1
- Plugin not working on Release Build iOS HOT 9
- Execution failed for task ':app:mergeDebugResources'. HOT 3
- Doesn't work in Phonegap Build (https://build.phonegap.com) HOT 3
- Not getting localized strings on iOS 13 HOT 2
- Remove lodash dependency? HOT 2
- Custom TRANSLATION_PATH not working or ignored HOT 3
- creating localisation with "-" fails on android HOT 2
- How to set fallback language HOT 3
- npm audit failes with 5 vulnerabilities (4 low, 1 moderate) HOT 4
- Force Android resConfigs HOT 1
- If missing config_android, then empty strings.xml will be created
- Prepare fails on iOS with "Error: Cannot read properties of undefined (reading 'project')" HOT 3
- Cordova plugin version is still on 3.2.1 HOT 3
- (iOS) Does not support encoded characters in project name (&) HOT 2
- projectFile import will break in cordova-ios@7 HOT 1
- Version 5.0.0 - 5.0.2 regex broken on Windows HOT 6
- Automatic tests HOT 1
- Possible VoltBuilder woes
- Installing the latest version causes an error → EUNSUPPORTEDPROTOCOL HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-localization-strings.