Localization

KeyboardKit supports 60+ locales and languages.

๐ŸŒ

Overview

Flexible localization support is an important part of a software keyboard, and should be able to localize the entire keyboard and change its behavior based on the locale.

In KeyboardKit, a KeyboardLocale defines keyboard-specific languages, where each has localized strings, assets, etc. KeyboardKit also extends the native Locale with more capabilities.

KeyboardKit Pro can unlock localized keyboards and services for all locales in your license.

Supported locales

KeyboardKit supports 63 locales:

๐Ÿ‡ฆ๐Ÿ‡ฑ ๐Ÿ‡ฆ๐Ÿ‡ช ๐Ÿ‡ฆ๐Ÿ‡ฒ ๐Ÿ‡ง๐Ÿ‡พ ๐Ÿ‡ง๐Ÿ‡ฌ ๐Ÿ‡ฆ๐Ÿ‡ฉ ๐Ÿณ๏ธ ๐Ÿ‡ญ๐Ÿ‡ท ๐Ÿ‡จ๐Ÿ‡ฟ ๐Ÿ‡ฉ๐Ÿ‡ฐ ๐Ÿ‡ณ๐Ÿ‡ฑ ๐Ÿ‡ง๐Ÿ‡ช ๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿ‡ช๐Ÿ‡ช ๐Ÿ‡ซ๐Ÿ‡ด ๐Ÿ‡ต๐Ÿ‡ญ ๐Ÿ‡ซ๐Ÿ‡ฎ ๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿ‡ง๐Ÿ‡ช ๐Ÿ‡จ๐Ÿ‡ญ ๐Ÿ‡ฌ๐Ÿ‡ช ๐Ÿ‡ฉ๐Ÿ‡ช ๐Ÿ‡ฆ๐Ÿ‡น ๐Ÿ‡จ๐Ÿ‡ญ ๐Ÿ‡ฌ๐Ÿ‡ท ๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿ‡ฎ๐Ÿ‡ฑ ๐Ÿ‡ญ๐Ÿ‡บ ๐Ÿ‡ฎ๐Ÿ‡ธ ๐Ÿณ๏ธ ๐Ÿ‡ฎ๐Ÿ‡ฉ ๐Ÿ‡ฎ๐Ÿ‡ช ๐Ÿ‡ฎ๐Ÿ‡น ๐Ÿ‡ฐ๐Ÿ‡ฟ ๐Ÿ‡น๐Ÿ‡ฏ ๐Ÿ‡น๐Ÿ‡ฏ ๐Ÿ‡น๐Ÿ‡ฏ ๐Ÿ‡ฑ๐Ÿ‡ป ๐Ÿ‡ฑ๐Ÿ‡น ๐Ÿ‡ฒ๐Ÿ‡ฐ ๐Ÿ‡ฒ๐Ÿ‡พ ๐Ÿ‡ฒ๐Ÿ‡น ๐Ÿ‡ฒ๐Ÿ‡ณ ๐Ÿ‡ณ๐Ÿ‡ด ๐Ÿณ๏ธ ๐Ÿ‡ฎ๐Ÿ‡ท ๐Ÿ‡ต๐Ÿ‡ฑ ๐Ÿ‡ต๐Ÿ‡น ๐Ÿ‡ง๐Ÿ‡ท ๐Ÿ‡ท๐Ÿ‡ด ๐Ÿ‡ท๐Ÿ‡บ ๐Ÿ‡ท๐Ÿ‡ธ ๐Ÿ‡ท๐Ÿ‡ธ ๐Ÿ‡ธ๐Ÿ‡ฐ ๐Ÿ‡ธ๐Ÿ‡ฎ ๐Ÿ‡ช๐Ÿ‡ธ ๐Ÿ‡ฐ๐Ÿ‡ช ๐Ÿ‡ธ๐Ÿ‡ช ๐Ÿ‡น๐Ÿ‡ท ๐Ÿ‡บ๐Ÿ‡ฆ ๐Ÿ‡บ๐Ÿ‡ฟ

Each keyboard locale refers to a native Locale and has additional keyboard-specific information, as well as localized assets and strings that can be translated with the KKL10n enum.

Locale Functionality

The KeyboardLocale enum defines all supported locales, like .english, .swedish, and .persian.

KeyboardKit extends the native Locale type with more capabilities, like providing a .lineDirection, .isLeftToRight, .isTopToBottom, etc. You can also get the .flag, sort locales in more ways, etc.

You can get the current keyboard locale and all available locales with KeyboardContext .locale and .locales. These are raw Locales, since a keyboard extension is not limited to the KeyboardLocale.

How to change keyboard locale

You can change the keyboard locale for a KeyboardContext by setting locale to a new locale, or use the convenience functions that support KeyboardLocale.

If the context locales has multiple values, you can switch locale using selectNextLocale() or using a LocaleContextMenu that lets the user select a locale.

Setting the locale updates the controllerโ€™s primaryLanguage, which controls things like spellchecking and text direction. It will also set the display name in the system keyboard switcher.

LTR and RTL locales

KeyboardKit supports LTR (Left-To-Right) and RTL locales. You donโ€™t need to setup your keyboard to support RTL. Just change the keyboard locale and KeyboardKit automatically adjusts the keyboard.

๐Ÿ‘‘ Pro features

KeyboardKit Pro unlocks a localized InputSet, KeyboardLayoutProvider and CalloutActionProvider for every KeyboardLocale that the license unlocks.

This means that KeyboardKit Pro can create fully localized SystemKeyboard for all supported locales.

Documentation

The information on this page has been shortened to be easier to overview. For more information about this feature, code samples, etc. please see the online documentation.


Read more

Pro Features