languages support (WIP)
This commit is contained in:
@@ -20,6 +20,15 @@ path platform::get_controls_file() {
|
||||
return path(CONTROLS_FILE);
|
||||
}
|
||||
|
||||
std::string platform::detect_locale() {
|
||||
// TODO: implement
|
||||
std::string name = setlocale(LC_ALL, nullptr);
|
||||
if (name.find("ru_RU") != std::string::npos) {
|
||||
return "ru_RU";
|
||||
}
|
||||
return "en_US";
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
#include <Windows.h>
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace platform {
|
||||
extern void configure_encoding();
|
||||
extern std::filesystem::path get_settings_file();
|
||||
extern std::filesystem::path get_controls_file();
|
||||
extern std::string detect_locale();
|
||||
}
|
||||
|
||||
#endif // UTIL_PLATFORM_H_
|
||||
Reference in New Issue
Block a user