-
Notifications
You must be signed in to change notification settings - Fork 1
Provide a new translation
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!
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 :)
- Euro/app/Resources/translations/messages.en.yml
- Euro/src/Application/Sonata/NewsBundle/Resources/translations/messages.en.yml
- Euro/src/Application/Sonata/UserBundle/Resources/translations/messages.en.yml
- src/Euro/CoinBundle/Resources/translations/messages.en.yml
- src/Euro/ContactBundle/Resources/translations/messages.en.yml
- src/Euro/PageBundle/Resources/translations/messages.en.yml
- src/Euro/PrivateMessageBundle/Resources/translations/messages.en.yml
- src/Euro/CoinBundle/Resources/translations/CoinAdmin.en.yml
- src/Euro/CoinBundle/Resources/translations/CountryAdmin.en.yml
- src/Euro/CoinBundle/Resources/translations/ValueAdmin.en.yml
- src/Euro/CoinBundle/Resources/translations/WorkshopAdmin.en.yml
- src/Euro/CoinBundle/Resources/translations/YearAdmin.en.yml
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).
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>
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>
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
.
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
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 :)