- copy
src/locales/en.json
file to<your_language_code>.json
(for example createit.json
file to create Italian translation) - translate english text to your language:
...
"stepWifiConfDesc": "Enter SSID and password for your WiFi network",
...
...
"stepWifiConfDesc": "YOUR TRANSLATION GOES HERE",
...
- edit
src/locales/language.js
file and add your language
import localeEN from '../locales/en.json';
import localeES from '../locales/es.json';
import localePL from '../locales/pl.json';
const allMessages = {
de: {
source: localeDE,
nativeName: 'Deutsch',
flag: 'flags/de.png',
browserLang: ['de', 'de-de'],
},
en: {
source: localeEN,
nativeName: 'English',
flag: 'flags/gb.png',
browserLang: ['en', 'en-gb', 'en-us'],
},
es: {
source: localeES,
nativeName: 'Español',
flag: 'flags/es.png',
browserLang: ['es', 'es-es'],
},
};
import localeEN from '../locales/en.json';
import localeES from '../locales/es.json';
import localePL from '../locales/pl.json';
import localeIT from '../locales/it.json'; // add this line
const allMessages = {
de: {
source: localeDE,
nativeName: 'Deutsch',
flag: 'flags/de.png',
browserLang: ['de', 'de-de'],
},
en: {
source: localeEN,
nativeName: 'English',
flag: 'flags/gb.png',
browserLang: ['en', 'en-gb', 'en-us'],
},
es: {
source: localeES,
nativeName: 'Español',
flag: 'flags/es.png',
browserLang: ['es', 'es-es'],
},
// add this property
it: {
source: localeIT,
nativeName: 'Italiano',
flag: 'flags/it.png',
browserLang: ['it'],
},
};
Open Firefex, Chrome, Edge, Brave, Opera, any other browser you have installed and press F12
key. It will open developmer tools
. Choose console
and type: navigator.language
. You should type this in the console of as many browsers as you can - some browsers have different language code than others. Remeber to add a value to browserLang
list in lowercase.
The flag should be placed in public/flags
folder. It should be 24px wide and PNG format.