Skip to content

JOY/strapi-plugin-locale-select

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Strapi plugin locale-select

A Strapi custom field for selecting any locale based on the Luxon locales. Currenty it has:

  • Country, with Flags
  • Language
  • Timezone
  • Currency

Installation

To install this plugin, you need to add an NPM dependency to your Strapi application:

# Using yarn
yarn add strapi-plugin-locale-select

# Using npm
npm install strapi-plugin-locale-select

# Using pnpm
pnpm add strapi-plugin-locale-select

Then, you'll need to build your admin panel:

# Using yarn
yarn build

# Using npm
npm run build

# Using pnpm
pnpm build

Usage

After installation you will find the locale-select at the custom fields section of the content-type builder.

locale select screenshot

Now you can select any country from the list. The Alpha-2 code of the selected locale is stored in the database.

locale select screenshot

Development

Plugin creation

This plugin was created using Strapi 5 plugin SDK

# Using yarn
yarn dlx @strapi/sdk-plugin init strapi-plugin-locale-select

# Using npm
npx @strapi/sdk-plugin init strapi-plugin-locale-select

# Using pnpm
pnpm dlx @strapi/sdk-plugin init strapi-plugin-locale-select

Start watch mode on the plugin

To start working on your plugin

  • Open a terminal
  • Navigate to your plugin folder strapi-plugin-locale-select
  • Run the following command
# Using yarn
yarn watch:link

# Using npm
npm run watch:link

# Using pnpm
pnpm watch:link

Link the plugin to your Strapi project

To link the plugin to your Strapi project

  • Open a terminal
  • Navigate to your Strapi project
  • Run the following commands
# Using yarn
yarn dlx yalc add --link strapi-plugin-locale-select
yarn install

# Using npm
npx yalc add strapi-plugin-locale-select
npx yalc link strapi-plugin-locale-select
npm install

# Using pnpm
pnpm dlx yalc add --link strapi-plugin-locale-select
pnpm install

Donate

https://patreon.com/JOY

About

A Strapi custom field for selecting any timezone based on the Luxon timezones

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%