Offer Products Case Studies Expertises About us Contact Blog
FR EN

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 keyboard layout id
displayNameLabel on the space bar and in the language popup
imeEngineIdIME engine (none, romaji, flick, pinyin, …)

Bundled defaults define one profile per layout (56 total). 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.

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). Hindi has transliteration (hi-transliteration) and Devanagari (hi-Deva-deva).

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, and imeEngineId. 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, hi-Deva-deva). Full input methods (IME with candidate selection) are provided for Chinese, Japanese and Korean.

Profile idDisplay name
ar-arabicالعربية
be-cyrillicБеларуская
bg-cyrillicБългарски
bn-transliterationবাংলা
bs-qwertzBosanski
ca-qwertyCatalà
cs-qwertzČeština
cy-qwertyCymraeg
da-qwertyDansk
de-qwertzDeutsch
el-greekΕλληνικά
en-qwertyEnglish
es-qwertyEspañol
et-qwertyEesti
fi-qwertySuomi
fr-azertyFrançais
ga-qwertyGaeilge
gl-qwertyGalego
he-hebrewעברית
hi-Deva-devaहिन्दी
hi-transliterationहिन्दी
hr-qwertzHrvatski
hu-qwertzMagyar
hy-armenianհայերեն
is-qwertyÍslenska
it-qwertyItaliano
ja-12key日本語
ja-romaji日本語
ka-georgianქართული
kn-transliterationಕನ್ನಡ
ko-dubeolsik한국어
lt-qwertyLietuvių
lv-qwertyLatviešu
mk-cyrillicМакедонски
mt-qwertyMalti
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
ta-transliterationதமிழ்
te-transliterationతెలుగు
th-kedmaneeไทย
tr-qwertyTürkçe
uk-jcukenУкраїнська
vi-qwertyTiếng Việt
zh-Hans-pinyin简体中文
zh-Hant-HK-cangjie繁體中文 (香港)
zh-Hant-TW-zhuyin繁體中文 (台灣)
zh-Hant-pinyin-hant繁體中文