@thetribe/strapi-plugin-init-locales

1.0.3 • Public • Published

Strapi plugin init-locales

Creates the different locales for the internationalization plugin.


Installation

Add strapi-plugin-init-locales to your strapi (v4!).

# npm:
npm install strapi-plugin-init-locales
# yarn:
yarn add strapi-plugin-init-locales

Create these environment variables with your initial values.

INIT_LOCALES=en-US,fr-FR

Note: Do not forget to add the configuration to your config/plugins.[js|ts] file:

export default ({ env }) => ({
  ..., // other plugins
  'init-locales': {
    enabled: true,
    config: {
      locales: env('INIT_LOCALES', 'en,fr'),
    }
  }
});

Usage

After installing the plugin and creating your environment variables start your strapi (locally: npm run develop or yarn develop) and watch out for the info-log:

Creating locale [name-of-locale].
Locale [name-of-locale] created.

Note: The plugin will only create the locales if they do not already exists in your strapi application!

Readme

Keywords

none

Package Sidebar

Install

npm i @thetribe/strapi-plugin-init-locales

Weekly Downloads

0

Version

1.0.3

License

none

Unpacked Size

102 kB

Total Files

21

Last publish

Collaborators

  • ubik
  • davincilord
  • maxime-thetribe
  • mweydert
  • jvasseur