-
create a folder in the
localesdirectory, where the name of this new folder should contain the code of the language. (e.gde_DEfor German language ornl_NLfor Dutch). language codes can be found here. -
create
index.jsfile in the new directory. -
copy
index.jscontent from theen_US(english) folder and edit the code and the content. -
open
locales/locales.jsfile from the locales directory and import the new file like the rest. -
for the
docsall you have to do is copydocs.mdfromen_USfolder to the new language directory and start editing the content. (e.gde_DE/docs.md)
Run the app in dev mode to test.
The original english translation file.
en_US/index.js
const en_US = {
language_name: "English",
sub_title: "simple, fast, secure client-side file encryption",
};
export default en_US;
Copy en_US file content and create new language folder and file :
de_DE/index.js
const de_DE = {
language_name: "Deutsch",
sub_title: "Einfache, schnelle, sichere Client-seitige Dateiverschlüsselung",
};
export default de_DE;
then import the new file in locales.js
import en_US from "./en_US";
import de_DE from "./de_DE";
const locales = {
en_US,
de_DE,
};
export default locales;