The official FormKit internationalization (i18n) plugin. This package contains the locales and the plugin that integrates FormKit with these locales. Read the internationalization documentation for usage instructions.
Create a new internationalization plugin for FormKit.
registry
— The registry of FormKitLocales.Given a string or a date, return a nice human-readable version.
date
— A string or a date.string
Creates an oxford-comma separated list of items.
items
— the items to list out.conjunction
— in the list "x, y, and z", "and" is the conjunction. Defaults to "or".string
Orders two variables from smallest to largest.
first
— The first number or string.second
— The second number or string.[smaller: number | string, larger: number | string]
Given a string, convert it to sentence case.
str
— The string to sentence case.string
A locale is just a collection of locale message registries, they are keyed by the type (like a namespace) ex: "validation" or "ui". Plugin authors can declare their own types too.
A registry of locale messages — this is simply a keyed/value object with string keys (message name) and either string values (for simple returns) or functions that receive a context object.
The locale registry is just a key-value pair of locale indexes ('ar', 'en', 'it', etc.) to their respective locales.