OpenStreetBrowser/Howto translate

From OpenStreetMap Wiki
Jump to navigation Jump to search

Location of translations

You can translate most parts of OpenStreetBrowser with Weblate, a translation tool:

There are some other translations, which need actual code:


Translatable sub projects of OpenStreetBrowser

For reference, here are the sources of the translations. You are welcome to use them in your projects :-) (Check the licence files for reference).

First you need the ISO-639-1 code of your language (e.g. en for English or de for German). For example, if your language code is de, you have to name all language files de.json.

You should copy the file `en.json` (or, if available, `template.json`) to your translation and adapt the values.

-> See an overview how well each language is translated on the Translations page.

Singular / Plural

If you will find a value which looks like this:

 "tag:amenity": {
   "message": "Amenity",
   "!=1": "Amenities"

The "message" will be the default (and singular) value. !=1 the value if the count of objects is 0 or plural. It's not necessary to translate plurals as well, they are not used (yet). You can just replace this by:

 "tag:amenity": "Amenity in your language",

Non translated values

If a value is null or "", this value counts as not being translated yet. The English translation will be used instead.