Android string.xml resource file from server

后端 未结 4 1894
遇见更好的自我
遇见更好的自我 2021-01-12 08:33

As we know already e.g. we cannot change res folder values and files at runtime,

I am working on an app, in which we are supporting more than 25 languag

4条回答
  •  别那么骄傲
    2021-01-12 08:49

    Here Sqlite Option is better for your condition .

    Following is the structure of data base table (eg. LangTable)

    --------- ---------- -------- -------- --------- -------
    langKey Locale_En Local_hn Local_Fr.......................n

    ---------- ---------- --------- -------- ------ ------- ---

    btnOk ok ..... ...... ..........

    btnCancel cancel ......... .... .... .......

    Now here is method for get Relevant local string

    public String getResource(String key, String local){
    
    String value = "";
    
    value = Select local from LangTable where langKey = 'key';
    
    return value;
    
    } 
    

提交回复
热议问题