Releases: sveltekit-i18n/lib
Releases · sveltekit-i18n/lib
2.4.2
What's Changed
- Updated
@sveltekit-i18n/base
to version1.3.5
which containsconfig.fallbackLocale
fixes
Full Changelog: 2.4.1...2.4.2
2.4.1
What's Changed
- Add
locale-param
example by @jarda-svoboda in #125 - Updated readme
Full Changelog: 2.4.0...2.4.1
2.4.0
What's Changed
- Add SEO friendly
locale-router
example by @jarda-svoboda in #122 - Deploy examples to Netlify by @jarda-svoboda in #123
- Updated
parser-default
to version1.1.0
- Added
currency
modifier
- Added
Full Changelog: 2.3.2...2.3.3
2.3.2
What's Changed
- This version removes unused typescript declarations from build.
Full Changelog: 2.3.1...2.3.2
2.3.1
2.3.0
What's Changed
- Fixed Svelte 4 support
- Fixed trailing spaces on placeholder options – sveltekit-i18n/parsers#3
- Added
preprocess
strategy – sveltekit-i18n/base#9 - Added
rawTranslations
– sveltekit-i18n/base#10
Full Changelog: 2.2.2...2.3.0
2.2.2
What's Changed
Modifier
andParser
namespaces are now (re)exported directly fromsveltekit-i18n
library- Payload types and Custom modifier prop types can be now included directly in the generic
Config
type (instead ofnew 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: 2.2.1...2.2.2
2.2.1
Updated @sveltekit-i18n/base to version 1.2.1
:
- Adds fallback to
config.fallbackLocale
when unknown locale is given – previously, only unknown translation keys have been replaced byfallbackLocale
translations...
Full Changelog: 2.2.0...2.2.1
2.2.0
Updated @sveltekit-i18n/base to version 1.2.0
:
config.debug
has been replaced byconfig.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)
}
}
- Added
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: 2.1.4...2.2.0
2.1.4
Updated @sveltekit-i18n/base to version 1.1.3
:
- Another fix of non-standard locales
Full Changelog: 2.1.3...2.1.4