i18n

i18n features for your Nuxt project so you can easily add internationalization.

v8.0.0-beta.13 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v8.0.0-beta.12 by github-actions[bot]github-actions[bot]

   🐞 Bug Fixes

    View changes on GitHub

v8.0.0-beta.11 by github-actions[bot]github-actions[bot]

   🚨 Breaking Changes

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v8.0.0-beta.10 by github-actions[bot]github-actions[bot]

   🐞 Bug Fixes

    View changes on GitHub

v8.0.0-beta.9 by github-actions[bot]github-actions[bot]

   🐞 Bug Fixes

    View changes on GitHub

v8.0.0-beta.8 by github-actions[bot]github-actions[bot]

🚨 Breaking Changes

🚀 Features

🐞 Bug Fixes

View changes on GitHub

v8.0.0-beta.7 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v8.0.0-beta.6 by github-actions[bot]github-actions[bot]

   🐞 Bug Fixes

  • Cannot work locale changing, when we move with <NuxtLink> on no_prefix  -  by @kazupon in #1686 (159c4)
    View changes on GitHub

v8.0.0-beta.5 by github-actions[bot]github-actions[bot]

   🚨 Breaking Changes

   🐞 Bug Fixes

    View changes on GitHub

v8.0.0-beta.4 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v8.0.0-beta.3 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v8.0.0-beta.2 by github-actions[bot]github-actions[bot]

   🐞 Bug Fixes

    View changes on GitHub

v8.0.0-beta.1 by github-actions[bot]github-actions[bot]

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v8.0.0-alpha.3 by github-actions[bot]github-actions[bot]

   🚀 Features

    View changes on GitHub

v8.0.0-alpha.2 by github-actions[bot]github-actions[bot]

   🚀 Features

  • Support identifierAttribute option for useLocaleHead  -  by @kazupon in #1526
  • Support strategy property API  -  by @kazupon in #1533
  • Support detect browser language fully  -  by @kazupon in #1534

   🐞 Bug Fixes

    View changes on GitHub

v8.0.0-alpha.1 by kazuponkazupon

8.0.0-alpha.1 (2022-09-03)

This release is for Nuxt3.

This version is sitll alpha, the API might subject to breaking changes. We will make every effort to have the same I/F as v7.x, but Nuxt 3 is a major release, it might not be the same I/F.

About details, please check the v8 docs.

v8 alpha or later does not support Nuxt Bridge.

We will support Nuxt Bridge for v7.4 or v7.x later version. please see the Github Discussions for a detailed discussion of Nuxt Bridge supporting.

Thank you for your understanding 💚

v7.3.1 by rchlrchl

Bug Fixes

  • don't expose full project path through langDir option (#1786) (0738a0f)

v7.3.0 by rchlrchl

Features

  • add setting for setting expiration of the cookie that stores locale (#1492) (dd764d7)

v7.2.3 by rchlrchl

Bug Fixes

  • infinite redirect on URL with special characters (#1472) (426af76)

v7.2.2 by rchlrchl

Bug Fixes

  • fixed locale changing issue in server side middleware (#1429) (c10231d)

v7.2.1 by rchlrchl

Bug Fixes

  • don't detect locale from route when using no_prefix (#1421) (609782f)
  • docs: add info on using dynamic translations with _.vue (b6039d2), closes #1400
  • docs: correct links to Custom paths and Ignore routes (#1392) (091944c)
  • parse-pages: add jsx plugin for .vue files using jsx syntax (#1356) (8cdb999)

v7.2.0 by rchlrchl

Features

Bug Fixes

  • docs: refactor and separate some pages related to routing (89eb12f)
  • load vue-template-compiler with nuxt.resolver.requireModule (#1327) (c5a3ca8)

v7.1.0 by rchlrchl

Features

  • add support for query params in canonical url (#1274) (d5dea9c)

Bug Fixes

  • adjust strange redirection logic for prefix_and_default (#1304) (578acd8)

v7.0.3 by rchlrchl

Bug Fixes

v7.0.2 by rchlrchl

Bug Fixes

  • differentDomains: handling of runtime domains from store (#1183) (4d77019)

v7.0.1 by rchlrchl

Bug Fixes

  • return the redirect path when resolving redirects with localePath (#1253) (3538f77), closes #1248

v7.0.0 by rchlrchl

This is a major version release that changes some defaults, deprecates some options and changes the name of the published package. Refer to the Migration Guide from v6 to v7 for detailed migration steps.

⚠ BREAKING CHANGES

  • rename package to @nuxtjs/i18n
  • set redirectOn to root by default (#1244)
  • remove vuex syncLocale & vuex syncMessages (#1240)
  • disable addDirAttribute by default (#1239)
  • replace onlyOnNoPrefix and onlyOnRoot with redirectOn (#1210)
  • remove deprecated seo option (#1232)
  • remove deprecated $nuxtI18nSeo (#1207)
  • types: remove deprecated NuxtVueI18n (#1206)
  • remove deprecated beforeLanguageSwitch (#1200)

Code Refactoring

v6.28.1 by rchlrchl

Bug Fixes

v6.28.0 by rchlrchl

Features

Bug Fixes

  • custom routes with optional params adjusted incorrectly (#1243) (203f3db)
  • don't skip the cookie if no locale is detected in the route (#1235) (6c9b48f)

v6.27.3 by rchlrchl

Bug Fixes

v6.27.2 by rchlrchl

Bug Fixes

  • ensure localeProperties is reactive (on locale change) (#1208) (d2dd400)
  • types: fix compatibility issue with typescript 4.3.x+ (#1205) (acc1145)

v6.27.1 by rchlrchl

Bug Fixes

  • types: fix lazy type in deprecated types (#1190) (482317b)
  • handle protocol in the domain key for different domains (#1169) (45b2b82)

v6.27.0 by rchlrchl

Features

v6.26.0 by rchlrchl

Features

  • lazy: option for not injecting messages to Nuxt state (#1153) (2231f3b), closes #1149

v6.25.0 by rchlrchl

Features

  • types: add NuxtI18nInstance type for use with custom accessors (#1147) (aa4f4d8), closes #1146

v6.24.0 by rchlrchl

Features

Bug Fixes

v6.23.0 by rchlrchl

Features

  • support loading messages from file without lazy-loading (#1130) (03618fb), closes #412

Bug Fixes

  • IE11 compatibility issue due to is-https package (#1138) (dcf43de), closes #1137
  • types: misplaced jsdoc deprecated wrong API (9736bf1)

v6.22.3 by rchlrchl

Bug Fixes

  • lazy: message function not working when using lazy loading (#1125) (68b580e), closes #1124

Refactoring

  • include fallback locale messages in the main bundle (#1129)

v6.22.2 by rchlrchl

Bug Fixes

  • crash registering the vue-i18n-loader in old Node versions (43022c4)

v6.22.1 by rchlrchl

Bug Fixes

  • move lodash.merge to dependencies (b3f3f43)

v6.22.0 by rchlrchl

Features

Bug Fixes

  • router base not considered on redirecting in static mode (#1119) (75b7c6e), closes #1060

v6.21.1 by rchlrchl

Bug Fixes

  • only replace .js at the end of the resolved klona path (#1110) (204d77d), closes #1109
  • page not updated on changing lazy locale files (dev mode) (#1104) (e1ff096), closes #905

v6.21.0 by rchlrchl

Features

Bug Fixes

  • localePath/localeRoute missing query params (#1103) (0a95790)

v6.20.6 by rchlrchl

Bug Fixes

v6.20.5 by rchlrchl

Bug Fixes

  • don't apply any locale-logic to non-existent routes (#1093) (7180412), closes #1092
  • recursive clone triggered when locales object made reactive (#1090) (83c4398), closes #1075
  • support localePath with path input and customized routes (#1088) (4043968)
  • docs: adjusted example code in documentation to call the right context (#1087) (7b8f77d)

v6.20.4 by rchlrchl

Bug Fixes

  • avoid using commonjs for runtime (vite support) (3fc14ba)
  • use mjs version of klona (#1079) (bb0445d)

v6.20.3 by rchlrchl

Bug Fixes

  • lazy: allow extensions yml/yaml when loading lazy locales (01f92ae)

v6.20.2 by rchlrchl

Bug Fixes

  • lazy: only process lang files with js, ts and json extensions (#1070) (1cf1ac2), closes #1068

v6.20.1 by rchlrchl

Bug Fixes

  • compatibility issue with Nuxt 2.15.0 (9d276d7), closes #1063
  • docs: missing semicolon in Locales option example (#1056) (e9f2a6a)

v6.20.0 by rchlrchl

Features

  • API for handling locale change during page transitions (#963) (23b9cc4)

v6.19.0 by rchlrchl

Features

  • add dir property and defaultDirection option (#1023) (3b3dcc6)

Bug Fixes

  • invalid canonical SEO link with differentDomains (#1049) (d05317b)
  • deps: update all non-major dependencies (#1048) (8f4cef5)
  • localeProperties undefined when component used (#1043) (ff56a35)

v6.18.0 by rchlrchl

Features

v6.17.0 by rchlrchl

Features

  • fallbackLocale: support vue-i18n decision map fallback (#992) (b4c6cfd)

Bug Fixes

v6.16.0 by rchlrchl

Features

  • onlyOnNoPrefix - detect browser locale when no prefix (#896) (15f0a44)

Refactor

  • replace clonedeep with klona (#981)

Bug Fixes

  • detectBrowserLanguage: use ISO code if available (#965) (1e39a3b), closes #979 #499
  • docs: add defaultLocale to examples (#955) (4b69c6c)
  • docs: add missing parenthesis (#941) (4ecdee1)
  • docs: clarify the type of the vueI18n option (c9be559)
  • docs: fix some links in the documentation (1249226)
  • docs: fix some more links in the documentation (abbf212)
  • docs: include defaultLocale in the example configuration (#951) (6bacb3b)
  • docs: remove unwanted characters (bc9f76e), closes #960
  • generate: don't try to redirect route when static generating (#989) (d5957d0), closes #911
  • test: fix test expectation for trailingSlash=true (c9f2ef5)

v6.15.4 by rchlrchl

Bug Fixes

v6.15.3 by rchlrchl

Bug Fixes

  • don't use optional chaining for compatibility reasons (#930) (2d96629), closes #929

v6.15.2 by rchlrchl

Bug Fixes

  • docs: add warnings regarding no_prefix strategy (#891) (bbcbad9)
  • seo: don't include queries in canonical link (d09ad9e), closes #912
  • seo: enable canonical tag for all strategies (4ae4199)
  • seo: enable self-referential canonical tags (b62fd39)
  • add x-default hreflang tag for improved SEO (#922) (b35bc57)

v6.15.1 by rchlrchl

Bug Fixes

  • (prefix strategy) redirect from root doesn't respect cookie locale (#890) (d3b09f5), closes #887
  • add plugins from the main context to have consistent loading order (#889) (1ec8814), closes #874
  • docs: refactor options documentation (#888) (5f295be)

v6.15.0 by rchlrchl

Features

Bug Fixes

  • differentDomains: Match domain properly on client if port provided (#832) (3a0bc88)

IMPORTANT

For improved SEO, it's highly recommended to set detectBrowserLanguage.onlyOnRoot to true if you are using strategy other than no_prefix with detectBrowserLanguage enabled. This will ensure that crawlers won't get redirected when crawling pages other than the root page, which would then be considered duplicate content.

This will likely become a default behavior in the future.

v6.14.2 by rchlrchl

Bug Fixes

  • fails at extending routes when followed by another module (#884) (c0d136b), closes #157

v6.14.1 by rchlrchl

Bug Fixes

  • remove postinstall script that breaks production (56f8084)

v6.14.0 by rchlrchl

Features

  • add cookieSecure setting to set the Secure flag on the cookie (#869) (0f2d762)
  • docs: migrate docs to Nuxt Content (#864) (affb845)
  • add setting to use cross-origin cookie for detectBrowserLocale (#853) (e446676)

Bug Fixes

  • only import build-time dependency at build time (#875) (095cc78)
  • deps: pin dependencies (#865) (d66545f)
  • docs: fix various documentation links after migration (19c516c)
  • docs: typo in Spanish accent mark (#867) (4fadb8b)

v6.13.12 by rchlrchl

Bug Fixes

  • force-transpile deepcopy dependency to fix IE11 (#861) (9b9fec5), closes #860

v6.13.11 by rchlrchl

Bug Fixes

  • lazy: null-check nuxtState as it might not exist in SPA (#859) (6763390), closes #858

v6.13.10 by rchlrchl

Bug Fixes

  • routes: fix routes being generated after other modules (#851) (b453191), closes #850
  • types: add types for app.localePath and co. (#849) (dfd6d76)

v6.13.9 by rchlrchl

Bug Fixes

  • lazy: failure to load locales on SPA navigation to default locale (#846) (c2aafd6), closes #843

v6.13.8 by rchlrchl

Bug Fixes

  • don't crash on missing route when parsing page component options (#841) (46bbdc5), closes #838
  • null-check route to avoid rare crashes (fc02a65)

v6.13.7 by rchlrchl

Bug Fixes

  • lazy: error importing file when having imports within locale.file (3cb1d2a), closes #835

v6.13.6 by rchlrchl

Bug Fixes

v6.13.5 by rchlrchl

Bug Fixes

  • lazy: don't try to copy locales to build dir at run-time (#827) (55dac74), closes #826

v6.13.4 by rchlrchl

Bug Fixes

  • lazy: webpack error when only default locale exists (#825) (97f1dd8), closes #824

v6.13.3 by rchlrchl

Bug Fixes

v6.13.2 by rchlrchl

Bug Fixes

  • generate fallback routes for static build (#808) (c2106f7), closes #805
  • redirect loop on initial load (static mode & route with no locale) (4c9bc13), closes #798
  • types: fix type of detectBrowserLanguage to allow false (#793) (c62f19b)

v6.13.1 by rchlrchl

Bug Fixes

  • incorrect SEO links when vue-loader forces local i18n instance (#786) (8cf173d), closes #785

v6.13.0 by rchlrchl

Features

  • pass to-be-loaded locale when lazy-loading from exported function (#752) (145f3b2), closes #742

Bug Fixes

  • handling of trailing slash in localePath (#756) (1a69387), closes #717
  • initial redirect breaks reactivity in static mode (54b8186), closes #737
  • preserve query when handling rootRedirect (#771) (b201609)
  • types: extend NuxtOptions with i18n (when using i18n in the root of Nuxt config) (7c5241b)

v6.13.0-beta.0 by rchlrchl

Features

  • pass to-be-loaded locale when lazy-loading from exported function (#752) (145f3b2), closes #742

Bug Fixes

  • initial redirect breaks reactivity in static mode (ef80b0d), closes #737

v6.12.2 by rchlrchl

Bug Fixes

  • revert back to generating routes from extendRoutes() (#751) (439781f), closes #750
  • deps: update dependency is-https to v2 (#744) (baf3082)

v6.12.1 by rchlrchl

Bug Fixes

  • crash on using nuxt-i18n properties in a component with i18n options (#736) (fd8b684), closes #557
  • don't add trailing slashes to generated routes (#733) (b062044), closes #717
  • favor non-prefixed route with prefix_and_default strategy (#732) (09d2c0f), closes #721
  • remove encodePaths option and don't encode paths by default (#731) (aba92b3), closes #712

v6.12.1-beta.0 by rchlrchl

Bug Fixes

  • don't add trailing slashes to generated routes (4825d61), closes #717
  • favor non-prefixed route with prefix_and_default strategy (#732) (09d2c0f), closes #721
  • remove encodePaths option and don't encode paths by default (#731) (aba92b3), closes #712

v6.12.0 by rchlrchl

Features

Bug Fixes

  • don't do browser language detection during Nuxt generate (#718) (f1c5aca)
  • don't leave out non-prefixed routes for generate + prefix strategy (#726) (97fabbf), closes #700
  • trigger language detection on initial load in generated mode (#724) (a853de9)

v6.11.1 by rchlrchl

Bug Fixes

  • NavigationDuplicated error on loading 404 page in SPA (#705) (6bd80da), closes #702

v6.11.0 by rchlrchl

Features

  • docs: enable indexed search results in documentation (#687) (bea56a9)

Bug Fixes

  • redirect from 404 to defaultLocale if there is matching route (e99978d), closes #677 #491

v6.10.2-beta.0 by rchlrchl

Bug Fixes

  • redirect from 404 to defaultLocale if there is matching route (b20bd58), closes #677 #491

v6.10.1 by rchlrchl

6.10.1 (2020-04-23)

Bug Fixes

  • types: fix type of baseUrl to allow string (a495cb3)

v6.10.0 by rchlrchl

6.10.0 (2020-04-23)

Features

  • allow providing function for baseUrl option (#679) (056a8f7)

v6.9.3 by rchlrchl

6.9.3 (2020-04-23)

Bug Fixes

  • crash with latest vue-i18n related to using null locale (#678) (642fddf)
    • unlocked version of vue-i18n dependency as code was changed to deal with upstream breakage

v6.9.2 by rchlrchl

6.9.2 (2020-04-22)

Bug Fixes

  • lock vue-i18n version to 8.16.0 until crashing issue is fixed (ad82009)

v6.9.1 by rchlrchl

6.9.1 (2020-04-14)

Bug Fixes

  • crash with invalid locale cookie + no_prefix strategy + SEO (#666) (2ec72bc)

v6.9.0 by rchlrchl

6.9.0 (2020-04-14)

Improvement

  • re-use the store locale on the client if set on server (#593) (c8b05b1)

v6.8.1 by rchlrchl

6.8.1 (2020-04-03)

Bug Fixes

  • match full browser locale case-insensitively (same as short) (#655) (e614e8e), closes #651

v6.8.0 by rchlrchl

6.8.0 (2020-04-02)

Features

v6.7.2 by rchlrchl

6.7.2 (2020-03-31)

Bug Fixes

  • locale not updated on navigation (no fallbackLocale) (#647) (1ad3ed1), closes #643

v6.7.1 by rchlrchl

6.7.1 (2020-03-30)

Bug Fixes

  • don't try to use route params when vuex.syncRouteParams not enabled (1bdf320), closes #644

v6.7.0 by rchlrchl

6.7.0 (2020-03-24)

Features

  • allow customization of rootRedirect status code (#639) (38d8935)

v6.6.1 by rchlrchl

6.6.1 (2020-03-16)

Bug Fixes

  • types: add vueI18nLoader to AllOptionsInterface (#634) (f1dd816)
  • add tests for forwardedHost change, deprecate setting instead of removing (3f4d135)
  • Incomplete initialization with 'en-US' locale code and no default (#629) (eeb63bb), closes #628
  • remove forwardedHost option - make domain matching consistent on server/client (#630) (2a17c99)

v6.6.0 by rchlrchl

Features

  • Added cookieDomain option to override locale cookie's domain (#599) (7525cd7)
  • seo: additional catchall hreflang tags (#597) (ebd2213), closes #522
  • support external configuration file for vue-i18n options (#605) (c55bc6a), closes #585 #237

Bug Fixes

  • sync store locale before triggering onLanguageSwitched listener (#609) (9b699cf), closes #556

v5.3.0 by paulgvpaulgv

{
  "message": "You should use slots with <ContentRenderer>",
  "value": {
    "name": "v5.3.0",
    "tag_name": "v5.3.0",
    "date": "2018-09-11T19:57:08Z",
    "body": "",
    "v": 5,
    "url": "https://github.com/nuxt-modules/i18n/releases/tag/v5.3.0",
    "tarball": "https://api.github.com/repos/nuxt-modules/i18n/tarball/v5.3.0",
    "zipball": "https://api.github.com/repos/nuxt-modules/i18n/zipball/v5.3.0",
    "prerelease": false,
    "author": {
      "name": "paulgv",
      "url": "https://github.com/paulgv",
      "avatar": "https://avatars.githubusercontent.com/u/4895885?v=4"
    }
  },
  "excerpt": false,
  "tag": "div"
}

v5.2.1 by paulgvpaulgv

{
  "message": "You should use slots with <ContentRenderer>",
  "value": {
    "name": "v5.2.1",
    "tag_name": "v5.2.1",
    "date": "2018-08-26T14:59:00Z",
    "body": "",
    "v": 5,
    "url": "https://github.com/nuxt-modules/i18n/releases/tag/v5.2.1",
    "tarball": "https://api.github.com/repos/nuxt-modules/i18n/tarball/v5.2.1",
    "zipball": "https://api.github.com/repos/nuxt-modules/i18n/zipball/v5.2.1",
    "prerelease": false,
    "author": {
      "name": "paulgv",
      "url": "https://github.com/paulgv",
      "avatar": "https://avatars.githubusercontent.com/u/4895885?v=4"
    }
  },
  "excerpt": false,
  "tag": "div"
}

v5.2.0 by paulgvpaulgv

{
  "message": "You should use slots with <ContentRenderer>",
  "value": {
    "name": "v5.2.0 ",
    "tag_name": "v5.2.0",
    "date": "2018-08-24T13:34:36Z",
    "body": "",
    "v": 5,
    "url": "https://github.com/nuxt-modules/i18n/releases/tag/v5.2.0",
    "tarball": "https://api.github.com/repos/nuxt-modules/i18n/tarball/v5.2.0",
    "zipball": "https://api.github.com/repos/nuxt-modules/i18n/zipball/v5.2.0",
    "prerelease": false,
    "author": {
      "name": "paulgv",
      "url": "https://github.com/paulgv",
      "avatar": "https://avatars.githubusercontent.com/u/4895885?v=4"
    }
  },
  "excerpt": false,
  "tag": "div"
}

v5.1.1 by paulgvpaulgv

{
  "message": "You should use slots with <ContentRenderer>",
  "value": {
    "name": "v5.1.1",
    "tag_name": "v5.1.1",
    "date": "2018-08-14T16:11:19Z",
    "body": "",
    "v": 5,
    "url": "https://github.com/nuxt-modules/i18n/releases/tag/v5.1.1",
    "tarball": "https://api.github.com/repos/nuxt-modules/i18n/tarball/v5.1.1",
    "zipball": "https://api.github.com/repos/nuxt-modules/i18n/zipball/v5.1.1",
    "prerelease": false,
    "author": {
      "name": "paulgv",
      "url": "https://github.com/paulgv",
      "avatar": "https://avatars.githubusercontent.com/u/4895885?v=4"
    }
  },
  "excerpt": false,
  "tag": "div"
}