- Don't set
document.lang
if the value being set is an empty string.
- Ensure that
$date
,$time
and$number
react to language changes by returning a new function every time the locale changes.
- Updated logic of
getLocaleFromAcceptLanguageHeader
to return a "sibling" regional variant before moving to the next base language. E.g.fr,fr-CA;q=0.9,en;q=0.8
when the available locales arefr-FR
,en
will returnfr-FR
because it's a "sibling" variant offr-CA
.
- No changes since 0.6.0-beta.0
- Add
getLocaleFromAcceptLanguageHeader
for server side locale detection - Support number skeletons. Support might not be complete.
- Fix bug in 0.5.0.
- Ensure that
formatMessage
reacts to language changes by returning a new function every time the locale changes.
- Make some types more strict
- Update to latest version of typescript and babel-typescript.
- Export method (not a store) to generate a translation. Should almost never be used in the wild, as it won't be reactive.
- Fix typescript types
- [FEATURE] Add
$json
store to access the raw translations object. This feature was added to svelte-intl after the API of this library copied it, so this brings it to parity.
- [FEATURE] Allow to define keys as nested objects (e.g.
{ dinner: { main: { food: 'pizza' } } }
) beside of the traditional dot-namespaced flat object (e.g.{ 'dinner.main.food': 'pizza' }
)