从GWT中的属性文件中获取key的值

时间:2022-01-15 13:03:14

How can i get a value from properties file based on key in GWT. I have two properties files one is for English and other for French.I want to add a tooltip for the icon by getting the value from properties file using mouseover event.

如何根据GWT中的键从属性文件中获取值。我有两个属性文件,一个用于英语,另一个用于法语。我想通过使用鼠标悬停事件从属性文件中获取值来为图标添加工具提示。

How can i achieve this?

我怎样才能做到这一点?

Please help.

请帮忙。

1 个解决方案

#1


5  

You need to create an interface first, with the same name as of properties file, extending the built-in Constants interface provided by GWT. Method names must match the tag names uses in the .properties files

您需要首先创建一个具有与属性文件相同名称的接口,从而扩展GWT提供的内置Constants接口。方法名称必须与.properties文件中使用的标记名称匹配

This link might help you. Then get the String in your mouseOver event handler. Hope this helps.

此链接可能对您有所帮助。然后在mouseOver事件处理程序中获取String。希望这可以帮助。

#1


5  

You need to create an interface first, with the same name as of properties file, extending the built-in Constants interface provided by GWT. Method names must match the tag names uses in the .properties files

您需要首先创建一个具有与属性文件相同名称的接口,从而扩展GWT提供的内置Constants接口。方法名称必须与.properties文件中使用的标记名称匹配

This link might help you. Then get the String in your mouseOver event handler. Hope this helps.

此链接可能对您有所帮助。然后在mouseOver事件处理程序中获取String。希望这可以帮助。