docs: update on default language and how to add a language 🌐 (#1042)

* Update translation_contribution.md

* fix(language) update to the new Locale Identifier

* Update translation_contribution.md

* Update default_language.md

* Update translation_contribution.md

* Update default_language.md

* Update translation_contribution.md
This commit is contained in:
Marco Beretta 2023-10-11 22:37:42 +02:00 committed by GitHub
parent f63fe4b4e0
commit bc7a079208
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 15 deletions

View file

@ -2,8 +2,8 @@
## How to change the default language
- Open this file `client\src\store\language.js`
- Modify the "default" in the lang variable with your ISO 3166 Alpha-2 code :
- Open this file `client\src\store\language.ts`
- Modify the "default" in the lang variable with your locale identifier :
Example:
from **English** as default
@ -13,7 +13,7 @@ import { atom } from 'recoil';
const lang = atom({
key: 'lang',
default: 'en',
default: localStorage.getItem('lang') || 'en-US',
});
export default { lang };
@ -26,7 +26,7 @@ import { atom } from 'recoil';
const lang = atom({
key: 'lang',
default: 'it',
default: localStorage.getItem('lang') || 'it-IT',
});
export default { lang };