Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Provide a new translation

MGaetan89 edited this page Oct 29, 2012 · 5 revisions

EuroCoin Mania is able to be translated in any language, thanks to Symfony's Translation component. The language used on the site is the same as the one used by the visitor's web browser. If it is not available, then it uses English as a fallback. If that happens to you, read the following to see how you can provide a translation of EuroCoin Mania in your own language!

Files that need to be translated

All the texts you can see on the site have been split in multiple files, for each component: news, user profile, coins, ... Some of them are used in the admin area, and it is not required to translate them, but we would be really grateful if you could do so :)

Required

Optional

How to translate

You found those files? Good! Now rename every one of these files to change .en.yml into .your_language_code.yml. You can find your language code in this table (ISO 639-1).

Structure of a file

All the texts are stored in YAML files. Each file looks like this:

actions: Actions
administration: Administration
and: and
close: Close
coin_data_provider: Coins mintage provided by <a href="%path%" target="_blank">%name%</a>

What to translate

Everything after the first : has to be translated.

The above example will result as this in French:

actions: Actions
administration: Administration
and: et
close: Fermer
coin_data_provider: Tirage des pièces fournie par <a href="%path%" target="_blank">%name%</a>

Variables

Some text may contain variable. You don't need to translate them. A variable looks like this: %some_name%. You can see one above, in the text identified by coin_data_provider.

Plural form support

Symfony allows the use of a particular syntax to manage the plural form of a sentence. This syntax is as follow : 0 or 1 element|2 or more elements. If you need to be more specific, please refer to Symfony's official documentation.

# English
coin.doubles: %amount% dulicate|%amount% duplicates
# French
coin.doubles: %amount% double|%amount% doubles

Submit your translation

Once you have translated all the files, you can make a Pull Request to this repository and we will merge it in order to add it to EuroCoin Mania. Your translation will be available on the site after the next update :)

Clone this wiki locally