@lg2/datocms-plugin-preview-link-i18n

0.1.24 • Public • Published

datocms-plugin-preview-link-i18n

Plugins that give your page url with i18n.

You'll need to create a json file in your public app like below.

[
    { "path": "/", "params": [], "model": "PageHomeRecord", locale: "en" },
    { "path": "/about", "params": [], "model": "PageAboutRecord", locale: "en" },
    { "path": "/contact", "params": [], "model": "PageContactRecord", locale: "en" },
    { "path": "/:slug", "params": ["slug"], "model": "PageSlugRecord", locale: "en" },
    { "path": "/", "params": [], "model": "PageHomeRecord", locale: "en" },
    { "path": "/a-propos", "params": [], "model": "PageAboutRecord", locale: "fr" },
    { "path": "/contact", "params": [], "model": "PageContactRecord", locale: "fr" },
    { "path": "/:slug", "params": ["slug"], "model": "PageSlugRecord", locale: "fr" },
]

If using nuxtJs you can use the following plugins to help you creating this file

This plugins help you create an public json file on your web app to fit the routes on your app coralated with datoModelRecord.

Readme

Keywords

Package Sidebar

Install

npm i @lg2/datocms-plugin-preview-link-i18n

Weekly Downloads

6

Version

0.1.24

License

ISC

Unpacked Size

2.39 MB

Total Files

12

Last publish

Collaborators

  • romain_prache
  • romainavalle-lg2
  • lpfavreau