Can localization resources be downloaded in runtime?

后端 未结 3 892
傲寒
傲寒 2021-01-02 15:48

I have application with internet access and don\'t want to store many string.xml files for different languages.

What I want:

  1. Application c
3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-02 16:41

    Now I can see only solution:

    1. Create some "localization proxy" that will return me necessary resource (from string.xml or downloaded resource)
    2. Replace all getString() and getText() to your own method getStringFromLocalization
    3. Override TextView, Button and some other views with custom one and change there init and setText methods.

提交回复
热议问题