- create file with language name in locale folder. For instance
es-CL.json
, you can copy another json file and change its name - modify values according to the new language
- add new language to
VUE_APP_I18N_SUPPORTED_LOCALE
variable in.env
file (separated by comma) - compile or run project
npm install
Create virtual environement file at root place with name .env.development
with content:
NODE_ENV=development
VUE_APP_BASE_URL=http://endpoint_to_api
VUE_APP_MAPBOX_TOKEN=<your_mapbox_token>
VUE_APP_I18N_LOCALE=es
VUE_APP_I18N_FALLBACK_LOCALE=en
VUE_APP_I18N_SUPPORTED_LOCALE=en,es
npm run serve
Before to create production files we need to add .env.production
file with content:
NODE_ENV=production
VUE_APP_BASE_URL=http://production_endpoint_to_api
VUE_APP_MAPBOX_TOKEN=<your_mapbox_token>
VUE_APP_I18N_LOCALE=es
VUE_APP_I18N_FALLBACK_LOCALE=en
VUE_APP_I18N_SUPPORTED_LOCALE=en,es
After that run:
npm run build -- --mode production
All arguments before -- are considered npm arguments and arguments after -- are passed to vue-cli-service (that's we need).
npm run test:unit
npm run test:e2e
npm run lint