Wednesday, May 26, 2010

Re: On GWT I18N

Hi Stefan,

On Tue, May 25, 2010 at 6:32 PM, Stefan Bachert <stefanbachert@yahoo.de> wrote:
Hi Alexandros,

On 24 Mai, 17:30, Alexandros Papadakis <alpa...@gmail.com> wrote:
>
> Spring MVC, has a very nice way to handle this: Just put the properties file
> in a specific directory
> and everything works more or less ok..

When you want to do the same, do it with GWT. Make a service loading
your properties file up to the client.
Constants and your I18N-Interface are Interfaces. That mean you can
implement it as you like. You don't have to use the i18n generators
from GWT.
 
>. You want a specific installation to
> have different labels/messages?
> Just change this specific installation..
>
> So IMHO there is need for server side i18n in GWT.

I still don't think. It is rather the way you work.
But even when, it is not a big deal to make that work.

> I was actually wondering if there is an implementation around, and if not,
> if someone would care to start
> such a project...

I could do such a project, but then we need a contract.
Or are you just expect such a thing just for free?


No, I am not looking for a contract, I am looking for commitment, for people that will
have the time to support what will get developed or even willing to co-develop such
an open source project. 

The GWT i18n "stack" changes from version to version so it will be an overhead to 
keep it up to date.

Would you be interested?


>
> The only drawback I have found so far, for such an implementation is that
> you either have to use sync RPC
> to load and block while loading, OR you have to  load all your messages in
> you host page (like Dictionary
> does it), to have all messages available when running the app..  The last
> approach is somewhat safer, faster
> but it does require that you load ALL your messages beforehand...
>

So you have enough idea to do it yourself.

That is right unless you do not change your application.
You may split your i18n-interface in smaller parts. Maybe per dialog.
The you get a behaviour in between to both above

I am about the set up a generator for creating dialog layout in an
LayoutPanel.
The nice thing when using a generator is, you could do additional
things. One powerful aspect is that the generator builds a method
accepting a I18NConstantInterface and setting all label texts. In the
end I could set label text at any time, even with different languages


My main concern right now is 3rd party libraries and this includes GWT itself and 
its basic locale info like numbers, dates, currencies, etc. 

So I think, and I guess you would agree, only a generator based solution could do
the job described....

In a sense, instead of  

 <inherits name="com.google.gwt.i18n.I18N" />

you would have a:

<inherits name="org.younameit.serverside.gwt.i18n.I18N" />

and thats it!!

Alex
Stefan Bachert
http://gwtworld.de

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment