wymsee / cordova-imagePicker

Cordova Plugin For Multiple Image Selection
MIT License
407 stars 858 forks source link

How to add new language? #150

Open King-JXN opened 8 years ago

King-JXN commented 8 years ago

I want to use it in Chinese environment, how to I add Chinese package or change the prompt font like changing "CANCEL" to "取消"?

liyuyang126 commented 7 years ago

direct edit plugins\cordova-plugin-image-picker\src\android\Library\res\values\multiimagechooser_strings_en.xml

linrenling commented 7 years ago

How can add Chinese lang, not change the english lang?

hadassaChemouni commented 7 years ago

@linrenling I have the same problem as you you find what to do ?

linrenling commented 7 years ago

NO, do you?

cnryb commented 7 years ago

在那一堆语言下添加 <source-file src="src/android/Library/res/values-zh-rCN/multiimagechooser_strings.xml" target-dir="res/values-zh-rCN"/> 然后编写对应的翻译文件。 但是有一部分文字是自己写在代码中的,这个文件里面没有配置。

参考下面网址 http://www.cnblogs.com/bluestorm/archive/2013/04/01/2993554.html

kechen123 commented 7 years ago

找到目录platforms/android/res有国际化的几个文件夹,复制其中一个文件夹,修改为values-zh,然后修改其中的xml文件为multiimagechooser_strings_zh.xml。 打开multiimagechooser_strings_zh.xml文件,修改成你想要的文字,然后rm android,重新add android,这时看platforms/android/res/values/multiimagechooser_strings_en.xml里边的内容是否是你修改之后的内容,是的话打包,就可以了。

kechen123 commented 7 years ago

注意:选择图片数量控制提示在MultiImageChooserActivity.java文件中,步骤和之前说的一样