Skip to content

Latest commit

 

History

History
29 lines (25 loc) · 1.15 KB

LOCALES.md

File metadata and controls

29 lines (25 loc) · 1.15 KB

How to add a locale

  1. Create a subfolder in lib/locales. Please use 2 digit language codes and 2 digit country codes. E.g: it-IT, fr-CA Use codes from here

  2. Create an index.js and set metadata informations to _meta property.

module.exports = {
	_meta: {
		id: "fr-FR", // Locale code
		fallback: null, // Fallback locale code, if null, fallback will be the 'default' locale
		language: "French", // Language name
		country: "France", // Default country name
		countryCode: "FR" // Default country code
	},

	names: require("./names"),
	phone: require("./phone"),
	address: require("./address"),
	company: require("./company"),
	internet: require("./internet")
};
  1. Copy an existing locale files to your new locale directory
  2. Override or add your locale data to files
  3. Cover your locale with test: example. Use npm run ci under development.
  4. Run npm test
  5. If every test passed, create a PR with the new locale