Adding a New Language Configuration
To add a new language configuration, follow these steps:
-
Duplicate an Existing Language Directory
- Choose any existing language directory that you are familiar with, and duplicate it.
- Name the new directory according to the
langattribute specified inlang-config-map.tsx.
-
Create a New
.tsFile in the Current Directory- In the
localesdirectory, create a.tsfile named to align with the new directory. - Copy the contents of the
en-US.tsfile into this new.tsfile. - Update the following line to match your new language directory:
const requireContext = require.context( `./{new-language-directory}`, false, /\.ts$/ );
- In the
-
Translate Each Attribute Value
- Open the
.tsfile in the new directory. - Translate the value of each key into your target language.
- Open the
-
Finalize the Configuration
- Review and ensure all translations are complete.
- Your new language configuration is now ready for use!