Class TranslationMap

java.lang.Object
com.graphhopper.util.TranslationMap

public class TranslationMap extends Object
A class which manages the translations in-memory. See here for more information: ./docs/core/translations.md

Author:
Peter Karich
  • Constructor Details

    • TranslationMap

      public TranslationMap()
  • Method Details

    • countOccurence

      public static int countOccurence(String phrase, String splitter)
    • doImport

      public TranslationMap doImport(File folder)
      This loads the translation files from the specified folder.
    • doImport

      public TranslationMap doImport()
      This loads the translation files from classpath.
    • add

      public void add(Translation tr)
    • getWithFallBack

      public Translation getWithFallBack(Locale locale)
      Returns the Translation object for the specified locale and falls back to English if the locale was not found.
    • get

      public Translation get(String locale)
      Returns the Translation object for the specified locale and returns null if not found.
    • toString

      public String toString()
      Overrides:
      toString in class Object