GWT - 在事件中执行另一个URL

时间:2014-10-17 14:12:48

标签: gwt internationalization

我正在尝试在GWT中实施国际化。我说完了,这很有效。但是,当我点击一个按钮时,我想用参数& locale = de执行URL。

例如:

原始网址 - > /* http://127.0.0.1:8888/MyApp.html?gwt.codesvr=127.0.0.1:9997 */

当我点击按钮时,我想执行此URL - > /* http://127.0.0.1:8888/MyApp.html?gwt.codesvr=127.0.0.1:9997&locale=de */

有办法做到这一点吗?

感谢您的关注!

1 个答案:

答案 0 :(得分:1)

在按钮处理程序中尝试此操作

 Window.Location.replace(Window.Location.getPath() + 
                            Window.Location.getQueryString() +"&locale=de");
相关问题