Skip to content

Commit

Permalink
#15 add Finnish language auto-selector
Browse files Browse the repository at this point in the history
  • Loading branch information
XProger committed Apr 8, 2019
1 parent aca8893 commit f387a7b
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/platform/nix/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,19 +365,21 @@ int checkLanguage() {
uint16 id;
memcpy(&id, lang, 2);

if (id == TWOCC("en")) return STR_LANG_EN - STR_LANG_EN;
if (id == TWOCC("fr")) return STR_LANG_FR - STR_LANG_EN;
if (id == TWOCC("de")) return STR_LANG_DE - STR_LANG_EN;
if (id == TWOCC("es")) return STR_LANG_ES - STR_LANG_EN;
if (id == TWOCC("it")) return STR_LANG_IT - STR_LANG_EN;
if (id == TWOCC("pl")) return STR_LANG_PL - STR_LANG_EN;
if (id == TWOCC("uk")) return STR_LANG_RU - STR_LANG_EN;
if (id == TWOCC("be")) return STR_LANG_RU - STR_LANG_EN;
if (id == TWOCC("ru")) return STR_LANG_RU - STR_LANG_EN;
if (id == TWOCC("ja")) return STR_LANG_JA - STR_LANG_EN;
if (id == TWOCC("gr")) return STR_LANG_GR - STR_LANG_EN;

return 0;
int str = STR_LANG_EN;
if (id == TWOCC("en")) return STR_LANG_EN;
if (id == TWOCC("fr")) return STR_LANG_FR;
if (id == TWOCC("de")) return STR_LANG_DE;
if (id == TWOCC("es")) return STR_LANG_ES;
if (id == TWOCC("it")) return STR_LANG_IT;
if (id == TWOCC("pl")) return STR_LANG_PL;
if (id == TWOCC("uk")) return STR_LANG_RU;
if (id == TWOCC("be")) return STR_LANG_RU;
if (id == TWOCC("ru")) return STR_LANG_RU;
if (id == TWOCC("ja")) return STR_LANG_JA;
if (id == TWOCC("gr")) return STR_LANG_GR;
if (id == TWOCC("fi")) return STR_LANG_FI;

return str - STR_LANG_EN;
}

int main(int argc, char **argv) {
Expand Down

0 comments on commit f387a7b

Please sign in to comment.