本文整理了Java中org.simpleframework.http.Request.getLocales
方法的一些代码示例,展示了Request.getLocales
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getLocales
方法的具体详情如下:
包路径:org.simpleframework.http.Request
类名称:Request
方法名:getLocales
暂无
代码示例来源:origin: org.simpleframework/simple
/**
* This is used to acquire the locales from the request header. The
* locales are provided in the <code>Accept-Language</code> header.
* This provides an indication as to the languages that the client
* accepts. It provides the locales in preference order.
*
* @return this returns the locales preferred by the client
*/
public List<Locale> getLocales() {
return request.getLocales();
}
代码示例来源:origin: org.simpleframework/simple-http
/**
* This is used to acquire the locales from the request header. The
* locales are provided in the <code>Accept-Language</code> header.
* This provides an indication as to the languages that the client
* accepts. It provides the locales in preference order.
*
* @return this returns the locales preferred by the client
*/
public List<Locale> getLocales() {
return request.getLocales();
}
代码示例来源:origin: ngallagher/simpleframework
/**
* This is used to acquire the locales from the request header. The
* locales are provided in the <code>Accept-Language</code> header.
* This provides an indication as to the languages that the client
* accepts. It provides the locales in preference order.
*
* @return this returns the locales preferred by the client
*/
public List<Locale> getLocales() {
return request.getLocales();
}
代码示例来源:origin: restx/restx
@Override
public Locale getLocale() {
if (request.getLocales() != null && !request.getLocales().isEmpty()) {
return request.getLocales().get(0);
}
return Locale.getDefault();
}
代码示例来源:origin: io.restx/restx-server-simple
@Override
public Locale getLocale() {
if (request.getLocales() != null && !request.getLocales().isEmpty()) {
return request.getLocales().get(0);
}
return Locale.getDefault();
}
代码示例来源:origin: restx/restx
@Override
public ImmutableList<Locale> getLocales() {
List<Locale> locales = request.getLocales();
if (locales.isEmpty()) {
return ImmutableList.of(Locale.getDefault());
} else {
return ImmutableList.copyOf(locales);
}
}
代码示例来源:origin: io.restx/restx-server-simple
@Override
public ImmutableList<Locale> getLocales() {
List<Locale> locales = request.getLocales();
if (locales.isEmpty()) {
return ImmutableList.of(Locale.getDefault());
} else {
return ImmutableList.copyOf(locales);
}
}
内容来源于网络,如有侵权,请联系作者删除!