Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/386.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java GWT/GXT国际化的问题_Java_Gwt_Internationalization_Constants_Gxt - Fatal编程技术网

Java GWT/GXT国际化的问题

Java GWT/GXT国际化的问题,java,gwt,internationalization,constants,gxt,Java,Gwt,Internationalization,Constants,Gxt,我正在尝试将_ro.properties文件添加到Sencha GXT应用程序中 问题是应用程序完全忽略了我的语言环境,并使用默认的.properties文件 这些文件添加到同一个包(“client.constants”)中,如下所示: LoginWindowConstants.java: package com.itsix.logbook.client.constants; import com.google.gwt.i18n.client.Constants; public interf

我正在尝试将_ro.properties文件添加到Sencha GXT应用程序中

问题是应用程序完全忽略了我的语言环境,并使用默认的.properties文件

这些文件添加到同一个包(“client.constants”)中,如下所示:

LoginWindowConstants.java:

package com.itsix.logbook.client.constants;

import com.google.gwt.i18n.client.Constants;

public interface LoginWindowConstants extends Constants {
@DefaultStringValue("Login to Amsterdam Arena logbook")
String title();

@DefaultStringValue("Login")
String loginButtonLabel();

@DefaultStringValue("Username")
String userNameFieldLabel();

@DefaultStringValue("Password")
String passwordFieldLabel();

    @DefaultStringValue("Forgotten password")
    String forgottenPasswordButtonLabel();
}
LoginWindowConstants\u ro.properties:

$PP_OFF
title=Login to Amsterdam Arena Logbook - RO Properties
loginButtonLabel=Login
userNameFieldLabel=Username
passwordFieldLabel=Password
forgottenPasswordButtonLabel=Forgotten Password
将以下内容添加到.xml文件中

      <!-- Other module inherits                                      -->
      <inherits name="com.google.gwt.i18n.I18N"/>

  <!--  supported locale settings -->
  <extend-property name="locale" values="ro" />


我希望有经验的人能让我知道我遗漏了什么。

您的代码只是让区域设置可用

它应该通过向url添加一个参数来工作

xyz.com?locale=ro

要将俄语设置为默认值,应使用:


您的代码只是使区域设置可用

它应该通过向url添加一个参数来工作

xyz.com?locale=ro

要将俄语设置为默认值,应使用:



U可以在jsp中使用此标记。一旦加载,它将采用meta标记中单独指定的区域设置。是的,我也在jsp中使用gwt:property——并确定如何从请求中设置它。getHeader(“接受语言”)。。。但是,如果没有与Accept language headerU匹配的区域设置,仍然会设置默认值。您可以在jsp中使用此标记。一旦加载,它将使用meta标记中指定的区域设置。是的,我也在jsp中使用gwt:property——并找出从请求中设置它的方法。getHeader(“Accept language”)。。。但如果没有与Accept language标头匹配的区域设置,则仍然设置默认值
 <!-- SETS AS THE DEFAULT -->
 <set-property-fallback name="locale" value="ro"/>