Issue
Given: library, which open own frames (fragments and activities), with own text fields and strings. Library has three files strings.xml
for localization regions, where speak in English, Russian and Ukrainian.
Needs: give for user opportunity localize my library. I can't keep more languages, so it must do library's user.
Variant of solution: create Java-class with all text values (I has bit strings). User can set in this class values from his strings files and it take opportunity to localize by strings.xml
file. But this varian so uncomfortable for user.
Question: how give for user opportunity to localize my library's strings?
Solution
I can solved this problem. I try to create in project (where uses library) folder with name values-de
and put in folder strings.xml
with strings names from library, but with another values. And it worked!
So: project-library can use values from project, if then defined with same names, which they defined in library-resources.
Answered By - Rostislav Dugin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.