MCPcopy Create free account
hub / github.com/deskflow/deskflow / getCurrentLanguageCode

Method getCurrentLanguageCode

src/lib/deskflow/win32/AppUtilWindows.cpp:158–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158std::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
171HKL AppUtilWindows::getCurrentKeyboardLayout() const
172{

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected