quitsocialmedia.club/pages/Localization.md

5.4 KiB
Raw Permalink Blame History

title permalink redirect_from description toc tags todo
Localization /l10n/
/it/l10n/
/localization/
/translate/
/translation/
/fr/l10n/
Localization and translation guidelines false
wip
Update according to how Eleventy works

Localizing a content means translating it in another language to make it available to a broader public. If you would like to do it, first of all thank you very much; secondly, there are a few things you need to know.

If you want to translate this website, do not skip this page content: please read carefully the guide below.
  • You should have a complete understanding of English, since…
  • …all of the content has to be translated from English only; for example, if you want to translate a page in French and you are proficient in Italian and French, you should not translate it from Italian to French, but from English to French: pages in English are the ones you should refer to when translating. Also: the first pages to be updated, the ones with better content and new data are the ones in English; you dont want to risk to translate an outdated version of the page.
  • You should be familiar with GitHub and Jekyll
  • It might be helpful to know how git works
  • Before translating anything, you have to change the wrapper layout file by adding a condition for the language your translating to, like this: {% raw %}{% elsif page.lang == 'page-lang' %}{% endraw %}, where page-lang stands for the language code of the language you are translating to.
  • Another important thing to do before translating pages, is to add the language you are translating to in the index.html file, which allows to select the website language before getting in.
  • The translation priority has the following order:
    1. The _includes pages (header, footer, dialogs). NOTE: translations in includes have to be inserted inside {% raw %}{% case page.lang %}{% endraw %}. They should be like this {% raw %}{% when 'page-lang' %}{% endraw %}, where page-lang stands for the language code of the language you are translating to.
    2. The main pages, which are:
      1. Homepage
      2. Why page
      3. About page
      4. Path page
      5. Quick page
      6. FAQ page
  • All English pages are located in the pages folder; when you are adding a translated page, place it in a subfolder named after the language code. For example, all pages in Italian have the following path: /pages/it/.
  • All pages contain a front matter attribute called ref. Please copy and paste it in the translated page to make it appear among the available page translations in the language menu. Note the ref value must not be changed: it should be always the same as the original page you are translating.
  • All localized pages permalinks should correspond to their localized title; for example, the permalink of the “Path” page is /path, its correspondent page in Italian has “Percorso” as its title, hence /percorso is its permalink.
  • All the links to resources are in English, but if you know content in the language you are translating to which is related or similar to the English links, feel free to add or replace them, but take it up in a pull request comment, so that the localized link can be verified.
  • Before committing the changes and opening a pull request:
    1. Update all the links in all the pages, to match the permalink of the localized page.
    2. Add your name in the Translators section of the Contributors page.

If you are in trouble or you need any kind of help, please [open an issue](https://github.com/xplosionmind/quitsocialmedia.club/issues 'Issues of this website's repository on GitHub').

[Email me](mailto:{{ site.author.email }}) if you know nothing about what I wrote about up to now but you would like to contribute to translation anyway.