Internationalization library built for SvelteKit.
@sveltekit-i18n/base
to version 1.3.5
which contains config.fallbackLocale
fixesFull Changelog: https://github.com/sveltekit-i18n/lib/compare/2.4.1...2.4.2
locale-param
example by @jarda-svoboda in https://github.com/sveltekit-i18n/lib/pull/125
Full Changelog: https://github.com/sveltekit-i18n/lib/compare/2.4.0...2.4.1
locale-router
example by @jarda-svoboda in https://github.com/sveltekit-i18n/lib/pull/122
parser-default
to version 1.1.0
currency
modifierFull Changelog: https://github.com/sveltekit-i18n/lib/compare/2.3.2...2.3.3
Full Changelog: https://github.com/sveltekit-i18n/lib/compare/2.3.1...2.3.2
Full Changelog: https://github.com/sveltekit-i18n/lib/compare/2.3.0...2.3.1
preprocess
strategy – https://github.com/sveltekit-i18n/base/pull/9
rawTranslations
– https://github.com/sveltekit-i18n/base/pull/10
Full Changelog: https://github.com/sveltekit-i18n/lib/compare/2.2.2...2.3.0
Modifier
and Parser
namespaces are now (re)exported directly from sveltekit-i18n
libraryConfig
type (instead of new i18n<Parser.Params<CustomPayload, CustomProps>>(...)
). Now you can use it like this:const config: Config<
{} /* Add your payload here */,
{} /* Add custom modifier options here */
> = {
parserOptions: {
customModifiers: {
/* Your custom modifiers */
}
}
// ...
}
export const { t, locale /* etc... */ } = new i18n(config);
Full Changelog: https://github.com/sveltekit-i18n/lib/compare/2.2.1...2.2.2
Updated @sveltekit-i18n/base to version 1.2.1
:
config.fallbackLocale
when unknown locale is given – previously, only unknown translation keys have been replaced by fallbackLocale
translations...Full Changelog: https://github.com/sveltekit-i18n/lib/compare/2.2.0...2.2.1
Updated @sveltekit-i18n/base to version 1.2.0
:
config.debug
has been replaced by config.log
object:const config = {
// ...your config...
log: {
logger: console, // you can use custom loggers => { error: errorHandler, warn: warnHandler, debug: debugHandler }
level: 'warn', // 'error' | 'warn' | 'debug'
prefix: '[i18n]: ', // avoid by '' (empty string)
}
}
config.fallbackValue
. By default translation key is returned when no translations have been found for given translation key. You can override it using this parameter like so:const config = {
// ...your config...
fallbackValue: undefined, // this will return `undefined` instead of unknown translation key...
}
Full Changelog: https://github.com/sveltekit-i18n/lib/compare/2.1.4...2.2.0
Updated @sveltekit-i18n/base to version 1.1.3
:
Full Changelog: https://github.com/sveltekit-i18n/lib/compare/2.1.3...2.1.4