Languages
Input profiles
An input profile binds language behavior (IME, prediction, fonts) to a keyboard layout (key topology):
| Field | Role |
|---|---|
id | Stable profile identifier (for example en-qwerty, ja-romaji) |
languageTag | BCP 47 tag: drives IME, prediction, and font selection |
layoutId | Bundled layout id (for example en, ja, zh-Hans); must exist in your deployed layouts.lnlay |
displayName | Label on the space bar and in the language popup |
imeEngineId | IME engine (none, romaji, flick, pinyin, …) |
predictionEnabled | Optional, default true. Word completion and next-word suggestions for this profile. The global predictionEnabled stays the master switch: a profile can only turn prediction off, never on while the global switch is off. Chinese, Japanese and Korean input-method candidates are unaffected |
nextWordEnabled | Optional, default true. Next-word suggestions after a word for this profile; word completion is unaffected. Off in the bundled ko-dubeolsik and ko-cheonjiin profiles |
Bundled defaults define one profile per layout. Profile id combines languageTag and layout variant (for example en-qwerty, de-qwertz, zh-Hans-pinyin, ja-12key).
Defaults ship in layouts.lnlay under share/lnvirtualkeyboard/dictionaries/ (always deployed with the plugin). Omit inputProfiles in QML to use bundled profiles; set only activeProfileIds and currentProfileId.
To ship custom layouts or profile catalogs, deploy a replacement layouts.lnlay under share/lnvirtualkeyboard/dictionaries/.
Activating bundled profiles
VirtualKeyboard {
width: parent.width
activeProfileIds: ["en-qwerty", "fr-azerty", "de-qwertz", "ja-romaji"]
currentProfileId: "en-qwerty"
}
Or at runtime via the singleton (mutating calls return bool; check Lnvk.lastError on failure):
Component.onCompleted: {
if (!Lnvk.setActiveProfileIds(["en-qwerty", "fr-azerty", "de-qwertz", "ja-romaji"]))
console.warn(Lnvk.lastError.code, Lnvk.lastError.message)
Lnvk.setCurrentProfileId("en-qwerty")
}
Japanese has two bundled profiles (ja-romaji, ja-12key), and so does Korean (ko-dubeolsik, ko-cheonjiin).
Custom profiles
Override or extend the bundled set by supplying inputProfiles (each object needs id, languageTag, layoutId, displayName, imeEngineId):
VirtualKeyboard {
inputProfiles: [
{
id: "en-qwerty",
languageTag: "en",
layoutId: "en",
displayName: "English",
imeEngineId: "none"
},
{
id: "es-qwerty",
languageTag: "es",
layoutId: "es",
displayName: "Español",
imeEngineId: "none"
}
]
activeProfileIds: ["en-qwerty", "es-qwerty"]
currentProfileId: "en-qwerty"
}
Switching at runtime
Users switch via the globe key (when ≥ 2 profiles are active) or long-press on the space bar.
Lnvk.selectProfile("fr-azerty") // by profile id — returns false if not found
Lnvk.selectLanguage("fr") // first active profile with this languageTag
currentProfileId, currentLanguage, and currentDisplayName on the singleton reflect the active profile:
Text { text: Lnvk.currentDisplayName } // e.g. "English"
Finding profiles
Discovery helpers return objects from the full inputProfiles catalog (not only activeProfileIds). Each entry has id, languageTag, layoutId, displayName, imeEngineId, predictionEnabled, and nextWordEnabled. Use Lnvk.activeProfiles for the enabled subset (same shape; used by the language popup).
| You have… | Call |
|---|---|
| Profile id | Lnvk.profileDisplayName(id) |
BCP‑47 languageTag ("ja", "zh-Hans") | Lnvk.profilesForLanguageTag(tag) |
// Two Japanese layouts share languageTag "ja"
const japanese = Lnvk.profilesForLanguageTag("ja")
if (japanese.length > 0)
Lnvk.selectProfile(japanese[0].id)
// Enabled profiles for the language popup
languageList.model = Lnvk.activeProfiles
selectLanguage(bcp47) switches among active profiles only (first exact languageTag match). Prefer selectProfile(id) when you know the profile id.
Available bundled profiles
Use profile id values in activeProfileIds, currentProfileId, and Lnvk.selectProfile(). Profile ids encode language and layout variant (for example ja-romaji, zh-Hans-pinyin, ko-cheonjiin). Chinese, Japanese and Korean profiles include full input methods (IME with candidate selection).
| Profile id | Display name |
|---|---|
bg-cyrillic | Български |
bs-qwertz | Bosanski |
ca-qwerty | Català |
cs-qwertz | Čeština |
da-qwerty | Dansk |
de-qwertz | Deutsch |
en-qwerty | English |
es-qwerty | Español |
et-qwerty | Eesti |
fi-qwerty | Suomi |
fr-azerty | Français |
gl-qwerty | Galego |
hr-qwertz | Hrvatski |
hu-qwertz | Magyar |
is-qwerty | Íslenska |
it-qwerty | Italiano |
ja-12key | 日本語 |
ja-romaji | 日本語 |
ko-cheonjiin | 한국어 |
ko-dubeolsik | 한국어 |
lt-qwerty | Lietuvių |
lv-qwerty | Latviešu |
mk-cyrillic | Македонски |
nb-qwerty | Norsk |
nl-qwerty | Nederlands |
pl-qwerty | Polski |
pt-qwerty | Português |
ro-qwerty | Română |
ru-jcuken | Русский |
sk-qwertz | Slovenčina |
sl-qwertz | Slovenščina |
sq-qwerty | Shqip |
sr-cyrillic | Српски |
sv-qwerty | Svenska |
tr-qwerty | Türkçe |
uk-jcuken | Українська |
zh-Hans-pinyin | 简体中文 |
zh-Hant-HK-cangjie | 繁體中文 (香港) |
zh-Hant-TW-zhuyin | 繁體中文 (台灣) |
zh-Hant-pinyin-hant | 繁體中文 |
More languages are coming soon.