R
R
robert_n2016-09-05 22:38:21
Android
robert_n, 2016-09-05 22:38:21

How to change string resources in third party library?

Hello! In my application I use the wonderful Material Dialogs library from Aidan Follestad . And there was a problem related to the fact that I do not understand how you can replace the standard string resources from this library with your own. I'm primarily interested in the lines that are used for the ColorChooserDialog :

...\exploded-aar\com.github.afollestad.material-dialogs\core\0.8.5.5\res\values\values.xml

<string name="md_back_label">Back</string>
    <string name="md_cancel_label">Cancel</string>
    <string name="md_choose_label">Choose</string>
    <string name="md_custom_label">Custom</string>
    <string name="md_done_label">Done</string>
    <string name="md_error_label">Error</string>
    <string name="md_presets_label">Presets</string>

I want to replace these:
<string name="md_back_label">Назад</string>
    <string name="md_cancel_label">Отмена</string>
    <string name="md_choose_label">Выбрать</string>
    <string name="md_custom_label">Настроить</string>
    <string name="md_done_label">Готово</string>
    <string name="md_error_label">Ошибка</string>
    <string name="md_presets_label">Палитра</string>

Perhaps the question is stupid and it will take less than a minute to solve it, but I have been trying to find a solution for 3 hours and so far it does not work. Please help!)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2016-09-05
@robert_n

So you paste these lines

<string name="md_back_label">Назад</string>
    <string name="md_cancel_label">Отмена</string>
    <string name="md_choose_label">Выбрать</string>
    <string name="md_custom_label">Настроить</string>
    <string name="md_done_label">Готово</string>
    <string name="md_error_label">Ошибка</string>
    <string name="md_presets_label">Палитра</string>

to your string.xml file and you will be happy. In the same way, you can add lines for other locations. After all, android itself selects string resources depending on the language settings of the phone.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question