API:GetInputLanguageString
From RoR Wiki
UI Lua API · Chat functions
Version: WAR 1.4.8
Returns a short label for the current keyboard input language.
label = GetInputLanguageString()
Arguments
None.
Returns
- label
wstring– One or two characters naming the input language.
Details
- The label is chosen from the active keyboard layout:
- Korean:
가 - Japanese:
あ - Chinese, simplified:
简 - Chinese, traditional:
繁 - Any other language: the first two letters of the Windows abbreviated language name, the second one in lower case (for example
Enfor English,Defor German).
- Korean:
- Before the client has read the keyboard layout for the first time, the label is
EN. - The function returns the label the client last stored; it does not query Windows itself.
Errors
None.
Example
Showing the label on the chat window's language button, from default/ea_chatwindow/source/chatwindow.lua:
local languageStateStr = GetInputLanguageString()
ButtonSetText("EA_TextEntryGroupEntryBoxLanguageButton", towstring(languageStateStr))
