Skip to content

Instantly share code, notes, and snippets.

@Akryum
Last active November 11, 2018 12:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Akryum/17ba4148497b865b36194cabdc9d7ba7 to your computer and use it in GitHub Desktop.
Save Akryum/17ba4148497b865b36194cabdc9d7ba7 to your computer and use it in GitHub Desktop.
Help translate @vue/cli-ui!

Localization

Translate the UI

Follow those simple steps to propose a new language for the CLI UI!

  1. Run navigator.languages or navigator.language to get the language code for the new locale. For example: 'fr'.

  2. Search NPM to see if a package called vue-cli-locale-<language code> doesn't already exist. If it does, please contribute to it by submitting PRs! If you don't find any, create a new package called vue-cli-locale-<language code>. For example: vue-cli-locale-fr

  3. Put the locale JSON file in a locales folder and give it the name of the language code. For example: locales/fr.json

  4. In the package.json file, set the unpkg field to the path to the locale file. For example: "unpkg": "./locales/fr.json"

  5. Publish the package on NPM.

The English reference locale is here.

Take a look at the french localization package as an example.

@SevenOutman
Copy link

So should I make a Chinese one or Evan will do that lol?

@aarongarciah
Copy link

@aarongarciah
Copy link

No need for the spanish version, someone already did it https://github.com/coderdiaz/vue-cli-locale-es

@mcicolella
Copy link

What about using Transifex (https://www.transifex.com/) to manage and centralize all translations?

@gluons
Copy link

gluons commented Nov 11, 2018

@Akryum It's moved to Transifex, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment