Giter Site home page Giter Site logo

Comments (4)

kelvinhokk avatar kelvinhokk commented on June 20, 2024 1

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.

rdantonio avatar rdantonio commented on June 20, 2024

Sorry for the delay in response, this sounds like it would work perfectly for us!

from cordova-plugin-localization-strings.

kelvinhokk avatar kelvinhokk commented on June 20, 2024

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.

rdantonio avatar rdantonio commented on June 20, 2024

Finally had a chance to test this out - it works great! Thank you for the effort!

from cordova-plugin-localization-strings.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.