-
-
Notifications
You must be signed in to change notification settings - Fork 3
How to translate the application user interface into yor language
- Make a copy of myfrlang.py
- Module myfrlang.py containes a Python dictionary with all interface elemets:
lang = {
"eng": {
"dir_load_allimg": ["Select a folder with reference pictures",
"Attention!", "Can't create working folder %s",
"Information", "Added %d face(s) from %d pictures at %s. Saving encodings to file..."],
"dir_load_allimg_sub": ["Select a folder with reference pictures",
"Attention!", "Can't create working folder %s",
"Information", "Added %d face(s) from %d pictures at %s. Saving encodings to file..."],
...
- All you nedd is to copy
"eng"
key:value section, translate all phrases in place and paste as a newlang
dictionary key:value. For example, make a "rus" root key and translate all phrases in []:
"rus": {
"dir_load_allimg": ["Выберите папку со справочными изображениями",
"Внимание!", "Не могу создать рабочую папку %s",
"Информация", "Добавлено %d лиц из% d изображений в %s. Сохранение кодировок в файл ... "],
"dir_load_allimg_sub": ["Выбрать папку со справочными изображениями",
"Внимание!", "Не могу создать рабочую папку %s",
"Информация", "Добавлено %d лиц из %d изображений в %s. Сохранение кодировок в файл ..."],
- Make a copy of fr_eng.py. Find
#################################
lang = "eng" # Language selector
#################################
and change
#################################
lang = "rus" # Language selector
#################################
- That's all you need to do.