Skip to content

Commit

Permalink
auto-call i18nClearLanguage for null path
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaTheFoxgirl committed Jun 2, 2022
1 parent db57f6e commit 473caef
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion source/i18n/tr.d
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@ void i18nClearLanguage() {
Loads a language
*/
bool i18nLoadLanguage(string file) {
lookuptable.clear();

// Empty path/null = unload
if (file.length == 0) {
i18nClearLanguage();
return true;
}

// Actually load
lookuptable.clear();
switch(file.extension.toLower) {
case ".mo":
try {
Expand Down

0 comments on commit 473caef

Please sign in to comment.