| 156 | } |
| 157 | |
| 158 | std::string AppUtilWindows::getCurrentLanguageCode() |
| 159 | { |
| 160 | std::string code("", 2); |
| 161 | |
| 162 | auto hklLayout = getCurrentKeyboardLayout(); |
| 163 | if (hklLayout) { |
| 164 | auto localLayoutID = MAKELCID(LOWORD(hklLayout), SORT_DEFAULT); |
| 165 | GetLocaleInfoA(localLayoutID, LOCALE_SISO639LANGNAME, &code[0], static_cast<int>(code.size())); |
| 166 | } |
| 167 | |
| 168 | return code; |
| 169 | } |
| 170 | |
| 171 | HKL AppUtilWindows::getCurrentKeyboardLayout() const |
| 172 | { |