From 650457c3859ffc60f703df9fd33b5b6d45bbe3cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Benavente?= Date: Tue, 12 Mar 2024 15:46:38 -0300 Subject: [PATCH] Add README to locales directory --- config/locales/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 config/locales/README.md diff --git a/config/locales/README.md b/config/locales/README.md new file mode 100644 index 00000000..e64ec8bd --- /dev/null +++ b/config/locales/README.md @@ -0,0 +1,19 @@ +locales [![Crowdin](https://badges.crowdin.net/rva/localized.svg)](https://crowdin.com/project/rva) +=== +Re-Volt America uses [Crowdin](https://translate.revolt-america.com) to maintain its extensive amount of translations. +Any message, alert, or user interface should be properly translated using this guide. All translation keys are +centralised within the `en.yml` file. + +If you want to add a new translation key or edit an existing key in English make a PR on Github. +For all other languages, go to our project on Crowdin. + +Example +=== +Let's say you want to add a new rule to our ruleset. + +First, go to `config/locales/en.yml` and add a new key. Always make sure that the yml path makes sense, and try to keep +them within their section's group. For example, all navbar strings are stored under the `nav.` yml key. + +Then, go to your code and use `t("path.in.en.yml")` to have it be translated. Note that you only have to add the +translation key! All the locale files (es.yml, pt_br.yml, etc.) are **NOT** to be manually modified, as they come +from Crowdin and are added to the project in batches automatically.