Skip to content

Commit

Permalink
Correctly set locale language property
Browse files Browse the repository at this point in the history
  • Loading branch information
obulat committed Oct 17, 2024
1 parent 648bf07 commit 00d51ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions frontend/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export default defineNuxtConfig({
dir: "ltr",
file: "en.json",
language: "en", // used for SEO purposes (html lang attribute)
isCatchallLocale: true, // the catchall locale for `en` locales

/* Custom fields */

Expand Down
10 changes: 2 additions & 8 deletions frontend/src/locales/scripts/get-validated-locales.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,8 @@ const getValidatedLocales = async () => {
code: locale.slug,
dir: locale.textDirection || "ltr",
file: `${locale.slug}.json`,
// Check for a language in all three versions of the ISO 639 spec,
// defaulting to the v1 two-character codes before checking for the
// three-character codes in the v2 and v3 specs.
language:
locale.langCodeIso_639_1 ??
locale.langCodeIso_639_2 ??
locale.langCodeIso_639_3 ??
undefined,
// Used for the html lang attribute.
language: locale.slug,

/* Custom fields */

Expand Down

0 comments on commit 00d51ff

Please sign in to comment.