Internationalizing problem

6 views
Skip to first unread message

Davor Peric

unread,
Dec 15, 2010, 9:44:13 PM12/15/10
to gwt-multipage
I want to internationalize my GWT application...to open my web page in
another language i have to add the locale parameter to the url of the
page. After doing this the url for my homepage looks like this:

http://127.0.0.1:8888/index.html?gwt.codesvr=127.0.0.1:9997&locale=hr

@UrlPatternEntryPoint("index.html(\\\\?gwt.codesvr=127.0.0.1:9997)?")
public class Index implements EntryPoint {
....
}

but no matter what kind of parameter I add to the url, I'm always
getting the menu that asks me to choose the entrypoint, can someone
tell me what i'm doing wrong?

Brian Reilly

unread,
Dec 15, 2010, 10:22:14 PM12/15/10
to gwt-mu...@googlegroups.com
You need to change the regex of your UrlPatternEntryPoint to account
for the extra locale parameter. If the query parameters don't matter
at all in your entry point selection, you could simply use something
like:

"index.html(\\\\?.*)?"

If you need to use some but not all of the query parameters to decide
which entry point to use, it could be tough to construct a regex to
meet that need. Ultimately, I think perhaps there should be another
form of entry point that will parse the query strings of both the
requested location and the annotation value and do an intelligent
comparison rather than using a regex. That way it could even include
an ignore list (which would include gwt.codesvr) and wouldn't care
about the order of the parameters.

This is just off the top of my head, so feel free to propose other
ideas. Thanks..

-Brian

> --
> Sie haben diese Nachricht erhalten, da Sie der Google Groups-Gruppe gwt-multipage beigetreten sind.
> Wenn Sie Nachrichten in dieser Gruppe posten möchten, senden Sie eine E-Mail an gwt-mu...@googlegroups.com.
> Wenn Sie aus dieser Gruppe austreten möchten, senden Sie eine E-Mail an gwt-multipag...@googlegroups.com.
> Besuchen Sie die Gruppe unter http://groups.google.com/group/gwt-multipage?hl=de, um weitere Optionen zu erhalten.
>
>

Davor Peric

unread,
Dec 17, 2010, 2:39:51 PM12/17/10
to gwt-multipage
Thank you very much, it workes with "index.html(\\\\?.*)?".
> > Besuchen Sie die Gruppe unterhttp://groups.google.com/group/gwt-multipage?hl=de, um weitere Optionen zu erhalten.
Reply all
Reply to author
Forward
0 new messages