congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
Translation.getLocale
Code IndexAdd Tabnine to your IDE (free)

How to use
getLocale
method
in
com.graphhopper.util.Translation

Best Java code snippets using com.graphhopper.util.Translation.getLocale (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew ArrayList()
  • Codota Iconnew LinkedList()
  • Smart code suggestions by Tabnine
}
origin: graphhopper/graphhopper

public void add(Translation tr) {
  Locale locale = tr.getLocale();
  translations.put(locale.toString(), tr);
  if (!locale.getCountry().isEmpty() && !translations.containsKey(tr.getLanguage()))
    translations.put(tr.getLanguage(), tr);
  // Map old Java 'standard' to latest, Java is a bit ugly here: http://stackoverflow.com/q/13974169/194609
  // Hebrew
  if ("iw".equals(locale.getLanguage()))
    translations.put("he", tr);
  // Indonesia
  if ("in".equals(locale.getLanguage()))
    translations.put("id", tr);
}
origin: graphhopper/graphhopper

@GET
@Path("/{locale}")
public Response get(@PathParam("locale") String locale) {
  Translation tr = map.get(locale);
  Response json = new Response();
  if (tr != null && !Locale.US.equals(tr.getLocale())) {
    json.defaultTr = tr.asMap();
  }
  json.locale = locale;
  json.en = map.get("en").asMap();
  return json;
}
origin: graphhopper/graphhopper

sb.append(tr.getLocale()).append(" - error in ").
    append(enEntry.getKey()).append("->").
    append(value).append("\n");
  String.format(Locale.ROOT, value, strs);
} catch (Exception ex) {
  sb.append(tr.getLocale()).append(" - error ").append(ex.getMessage()).append("in ").
      append(enEntry.getKey()).append("->").
      append(value).append("\n");
origin: com.rgi-corp/graphhopper

public void add(Translation tr) {
  Locale locale = tr.getLocale();
  translations.put(locale.toString(), tr);
  if (!locale.getCountry().isEmpty() && !translations.containsKey(tr.getLanguage()))
    translations.put(tr.getLanguage(), tr);
  // Map old Java 'standard' to latest, Java is a bit ugly here: http://stackoverflow.com/q/13974169/194609
  // Hebrew
  if ("iw".equals(locale.getLanguage()))
    translations.put("he", tr);
  // Indonesia
  if ("in".equals(locale.getLanguage()))
    translations.put("id", tr);
}
origin: com.graphhopper/graphhopper-core

public void add(Translation tr) {
  Locale locale = tr.getLocale();
  translations.put(locale.toString(), tr);
  if (!locale.getCountry().isEmpty() && !translations.containsKey(tr.getLanguage()))
    translations.put(tr.getLanguage(), tr);
  // Map old Java 'standard' to latest, Java is a bit ugly here: http://stackoverflow.com/q/13974169/194609
  // Hebrew
  if ("iw".equals(locale.getLanguage()))
    translations.put("he", tr);
  // Indonesia
  if ("in".equals(locale.getLanguage()))
    translations.put("id", tr);
}
origin: com.graphhopper/graphhopper

public void add( Translation tr )
{
  Locale locale = tr.getLocale();
  translations.put(locale.toString(), tr);
  if (!locale.getCountry().isEmpty() && !translations.containsKey(tr.getLanguage()))
    translations.put(tr.getLanguage(), tr);
  // Map old Java 'standard' to latest, Java is a bit ugly here: http://stackoverflow.com/q/13974169/194609
  // Hebrew
  if ("iw".equals(locale.getLanguage()))
    translations.put("he", tr);
  // Indonesia
  if ("in".equals(locale.getLanguage()))
    translations.put("id", tr);
}
origin: com.graphhopper/graphhopper-core

sb.append(tr.getLocale()).append(" - error in ").
    append(enEntry.getKey()).append("->").
    append(value).append("\n");
  String.format(Locale.ROOT, value, strs);
} catch (Exception ex) {
  sb.append(tr.getLocale()).append(" - error ").append(ex.getMessage()).append("in ").
      append(enEntry.getKey()).append("->").
      append(value).append("\n");
origin: com.rgi-corp/graphhopper

sb.append(tr.getLocale()).append(" - error in ").
    append(enEntry.getKey()).append("->").
    append(value).append("\n");
  String.format(value, strs);
} catch (Exception ex) {
  sb.append(tr.getLocale()).append(" - error ").append(ex.getMessage()).append("in ").
      append(enEntry.getKey()).append("->").
      append(value).append("\n");
origin: com.graphhopper/graphhopper

if (expectedCount != countOccurence(value, "\\%"))
  sb.append(tr.getLocale()).append(" - error in ").
      append(enEntry.getKey()).append("->").
      append(value).append("\n");
  } catch (Exception ex)
    sb.append(tr.getLocale()).append(" - error ").append(ex.getMessage()).append("in ").
        append(enEntry.getKey()).append("->").
        append(value).append("\n");
com.graphhopper.utilTranslationgetLocale

Popular methods of Translation

  • tr
  • asMap
  • getLanguage

Popular in Java

  • Updating database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • getExternalFilesDir (Context)
  • setContentView (Activity)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Join (org.hibernate.mapping)
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now