本文整理了Java中com.graphhopper.util.Helper.getLocale()
方法的一些代码示例,展示了Helper.getLocale()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Helper.getLocale()
方法的具体详情如下:
包路径:com.graphhopper.util.Helper
类名称:Helper
方法名:getLocale
暂无
代码示例来源:origin: graphhopper/graphhopper
public GHRequest setLocale(String localeStr) {
return setLocale(Helper.getLocale(localeStr));
}
代码示例来源:origin: graphhopper/graphhopper
/**
* This loads the translation files from the specified folder.
*/
public TranslationMap doImport(File folder) {
try {
for (String locale : LOCALES) {
TranslationHashMap trMap = new TranslationHashMap(getLocale(locale));
trMap.doImport(new FileInputStream(new File(folder, locale + ".txt")));
add(trMap);
}
postImportHook();
return this;
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
代码示例来源:origin: graphhopper/graphhopper
/**
* This loads the translation files from classpath.
*/
public TranslationMap doImport() {
try {
for (String locale : LOCALES) {
TranslationHashMap trMap = new TranslationHashMap(getLocale(locale));
trMap.doImport(TranslationMap.class.getResourceAsStream(locale + ".txt"));
add(trMap);
}
postImportHook();
return this;
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
代码示例来源:origin: com.rgi-corp/graphhopper
public GHRequest setLocale(String localeStr) {
return setLocale(Helper.getLocale(localeStr));
}
代码示例来源:origin: com.graphhopper/graphhopper-api
public GHRequest setLocale(String localeStr) {
return setLocale(Helper.getLocale(localeStr));
}
代码示例来源:origin: com.graphhopper/graphhopper
public GHRequest setLocale( String localeStr )
{
return setLocale(Helper.getLocale(localeStr));
}
代码示例来源:origin: com.graphhopper/graphhopper-core
/**
* This loads the translation files from the specified folder.
*/
public TranslationMap doImport(File folder) {
try {
for (String locale : LOCALES) {
TranslationHashMap trMap = new TranslationHashMap(getLocale(locale));
trMap.doImport(new FileInputStream(new File(folder, locale + ".txt")));
add(trMap);
}
postImportHook();
return this;
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
代码示例来源:origin: com.rgi-corp/graphhopper
/**
* This loads the translation files from the specified folder.
*/
public TranslationMap doImport(File folder) {
try {
for (String locale : LOCALES) {
TranslationHashMap trMap = new TranslationHashMap(Helper.getLocale(locale));
trMap.doImport(new FileInputStream(new File(folder, locale + ".txt")));
add(trMap);
}
postImportHook();
return this;
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
代码示例来源:origin: com.graphhopper/graphhopper
/**
* This loads the translation files from the specified folder.
*/
public TranslationMap doImport( File folder )
{
try
{
for (String locale : LOCALES)
{
TranslationHashMap trMap = new TranslationHashMap(Helper.getLocale(locale));
trMap.doImport(new FileInputStream(new File(folder, locale + ".txt")));
add(trMap);
}
postImportHook();
return this;
} catch (Exception ex)
{
throw new RuntimeException(ex);
}
}
代码示例来源:origin: com.rgi-corp/graphhopper
/**
* This loads the translation files from classpath.
*/
public TranslationMap doImport() {
try {
for (String locale : LOCALES) {
TranslationHashMap trMap = new TranslationHashMap(Helper.getLocale(locale));
trMap.doImport(TranslationMap.class.getResourceAsStream(locale + ".txt"));
add(trMap);
}
postImportHook();
return this;
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
代码示例来源:origin: com.graphhopper/graphhopper-core
/**
* This loads the translation files from classpath.
*/
public TranslationMap doImport() {
try {
for (String locale : LOCALES) {
TranslationHashMap trMap = new TranslationHashMap(getLocale(locale));
trMap.doImport(TranslationMap.class.getResourceAsStream(locale + ".txt"));
add(trMap);
}
postImportHook();
return this;
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
代码示例来源:origin: com.graphhopper/graphhopper
/**
* This loads the translation files from classpath.
*/
public TranslationMap doImport()
{
try
{
for (String locale : LOCALES)
{
TranslationHashMap trMap = new TranslationHashMap(Helper.getLocale(locale));
trMap.doImport(TranslationMap.class.getResourceAsStream(locale + ".txt"));
add(trMap);
}
postImportHook();
return this;
} catch (Exception ex)
{
throw new RuntimeException(ex);
}
}
代码示例来源:origin: graphhopper/map-matching
build();
} else {
Translation tr = trMap.getWithFallBack(Helper.getLocale(localeStr));
DouglasPeucker peucker = new DouglasPeucker().setMaxDistance(minPathPrecision);
PathMerger pathMerger = new PathMerger().
代码示例来源:origin: graphhopper/map-matching
StopWatch matchSW = new StopWatch();
Translation tr = new TranslationMap().doImport().getWithFallBack(Helper.getLocale(args.getString("instructions")));
final boolean withRoute = !args.getString("instructions").isEmpty();
XmlMapper xmlMapper = new XmlMapper();
内容来源于网络,如有侵权,请联系作者删除!