To add a new locale to your application, you need to create a new file in the public/locales
directory.
For example, to add a new language called fr
(French), you would create a new file called fr.json
in the public/locales
directory.
{
"hello": "Bonjour"
}
That's it! Now you can use the hello
key in your application and it will be translated to Bonjour
when the locale is set to fr
.