Languages

Input profiles

An input profile binds language behavior (IME, prediction, fonts) to a keyboard layout (key topology):

FieldRole
idStable profile identifier (for example en-qwerty, ja-romaji)
languageTagBCP 47 tag: drives IME, prediction, and font selection
layoutIdBundled layout id (for example en, ja, zh-Hans); must exist in your deployed layouts.lnlay
displayNameLabel on the space bar and in the language popup
imeEngineIdIME engine (none, romaji, flick, pinyin, …)
predictionEnabledOptional, 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
nextWordEnabledOptional, 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 idLnvk.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 idDisplay name
bg-cyrillicБългарски
bs-qwertzBosanski
ca-qwertyCatalà
cs-qwertzČeština
da-qwertyDansk
de-qwertzDeutsch
en-qwertyEnglish
es-qwertyEspañol
et-qwertyEesti
fi-qwertySuomi
fr-azertyFrançais
gl-qwertyGalego
hr-qwertzHrvatski
hu-qwertzMagyar
is-qwertyÍslenska
it-qwertyItaliano
ja-12key日本語
ja-romaji日本語
ko-cheonjiin한국어
ko-dubeolsik한국어
lt-qwertyLietuvių
lv-qwertyLatviešu
mk-cyrillicМакедонски
nb-qwertyNorsk
nl-qwertyNederlands
pl-qwertyPolski
pt-qwertyPortuguês
ro-qwertyRomână
ru-jcukenРусский
sk-qwertzSlovenčina
sl-qwertzSlovenščina
sq-qwertyShqip
sr-cyrillicСрпски
sv-qwertySvenska
tr-qwertyTürkçe
uk-jcukenУкраїнська
zh-Hans-pinyin简体中文
zh-Hant-HK-cangjie繁體中文 (香港)
zh-Hant-TW-zhuyin繁體中文 (台灣)
zh-Hant-pinyin-hant繁體中文

More languages are coming soon.