Support locale with language and region part

This commit is contained in:
Linus Groh
2020-02-06 21:26:21 +00:00
parent 6631929d6f
commit c1f58c992e
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -123,7 +123,9 @@ Remove the `ping/ping` location from the fetched data. This is useful when using
### `locale`
The language to use for the user interface. Available: `de` (German), `en` (English).
The locale to use for the user interface, this affects the language and date/time
formats. Available languages are `de` (German), `en` (English). You can use formats
like `en-GB`, `en-US`, `de-DE`.
- Type: [`String`]
- Default: `"en"`
+1 -1
View File
@@ -16,7 +16,7 @@ locales.keys().forEach(key => {
});
export default new VueI18n({
locale: config.locale,
locale: config.locale.split("-")[0],
fallbackLocale: "en",
formatFallbackMessages: true,
messages,