"Fossies" - the Fresh Open Source Software Archive
Member "graphhopper-1.0/docs/core/translations.md" (22 May 2020, 3176 Bytes) of package /linux/misc/graphhopper-1.0.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format).
Alternatively you can here view
the uninterpreted source code file.
A member file download can also be achieved by clicking within a package contents listing on the according byte size field.
You can help improve GraphHopper by adding your language! We have a dedicated forum for translations in case you are unsure or want to discuss before changing things.
See this spreadsheet and add a column for your language. Revisit it regularly to update or add new items. And see your language live at GraphHopper Maps e.g. explicitly specify the locale via:
de → German, en → English, zh → Simplified Chinese, …
There are already many existing :jp: :cn: :us: :fr: :es: :it: :ru: :de:
- What does the string after the language name mean ala ‘Spanish: es’? This is the language its ISO code (639-1) with two characters. E.g. look up your language on wikipedia to get this code. See Spanish as an example again.
- **What does the strange characters ala ’%1$s' in the items means?** This is a placeholder which is filled by GraphHopper. It is important to have as in some languages the position is different than in other languages or the translation is completely different. Example: "Enter roundabout and use exit %1$s“. In German language you have to add the word ‘nehmen’ after the exit-number parameter:”In den Kreisverkehr einfahren und Ausfahrt %1$s nehmen". It is very important that you do not forget about these parameter placeholders, please ask if you are unsure.
Integrate into GraphHopper
We’ll regularly update GraphHopper with new translations or fixes so no need to do this work for you. But if you still want to try your changes or want to speed up the integration you can do the following:
- Make GraphHopper working on your computer, where you need to git clone the repository - see here for more information.
- If you created a new language then add it in lexicographical order to TranslationMap.LOCALES (core/src/main/java/com/graphhopper/util) and to the script: core/files/update-translations.sh
cd graphhopper/core; curl 'https://docs.google.com/spreadsheets/d/10HKSFmxGVEIO92loVQetVmjXT0qpf3EA2jxuQSSYTdU/export?format=tsv&id=10HKSFmxGVEIO92loVQetVmjXT0qpf3EA2jxuQSSYTdU&gid=0' > tmp.tsv
./files/update-translations.sh tmp.tsv && rm tmp.tsv
- Now you can see your changes via
git diff. Make sure that is the only one with
- Now execute
mvn clean test to see if you did not miss arguments in your translation (see point 2 in the questions above) and start the GraphHopper service and go to localhost:8989 append e.g. &locale=de if your translation does not show up automatically
- Read the contributing guide to submit your changes
Please sign the GraphHopper License Agreement.