diff --git a/src/game.cpp b/src/game.cpp index 23ce240123b36..9c2589e37e3e1 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -635,12 +635,15 @@ void game::toggle_pixel_minimap() const void game::toggle_language_to_en() { + // No-op if we aren't complied with localization +#if defined(LOCALIZE) const std::string english = "en" ; static std::string secondary_lang = english; std::string current_lang = TranslationManager::GetInstance().GetCurrentLanguage(); secondary_lang = current_lang != english ? current_lang : secondary_lang; std::string new_lang = current_lang != english ? english : secondary_lang; set_language( new_lang ); +#endif } bool game::is_tileset_isometric() const diff --git a/src/translations.cpp b/src/translations.cpp index a67df00b07943..9514b2bcbb43d 100644 --- a/src/translations.cpp +++ b/src/translations.cpp @@ -102,6 +102,9 @@ void set_language( const std::string &lang ) current_language_version++; } while( current_language_version == INVALID_LANGUAGE_VERSION ); +#else + // Silence unused var warning + ( void ) lang; #endif // LOCALIZE reload_names();