如何通过resValue添加文本翻译

时间:2017-02-07 11:57:31

标签: android gradle android-resources

在我们的Android应用中,我们使用function viewSummary($rid) { $this->db->select('summary_call1,summary_call1_date,summary_call2,summary_call2_date,summary_sms1,summary_sms1_date,summary_sms2,summary_sms2_date,summary_email1,summary_email1_date,summary_email2,summary_email2_date,summary_other1,summary_other1_date'); $this->db->where('summary_call1 IS NOT NULL', null, false); $this->db->where('summary_call2 IS NOT NULL', null, false); //etc $query = $this->db->get_where('register',array('r_id'=>$rid)); return $query->result(); } 通过构建脚本传递字符串资源,如下所示:

resValue

如何添加这些字符串的翻译版本。要继续android { compileSdkVersion 25 buildToolsVersion "25.0.2" defaultConfig { resValue "string", "foo", "foo_value" resValue "string", "bar", "bar_value" ... etc values-devalues-ch等文件夹?

1 个答案:

答案 0 :(得分:0)

显然,无法按照here提到的gradle文件执行此操作。
如果您只想使用这些值,请更好地使用buildConfigField代替