Thanks.
As a brief related question, since the eval() function is slower than
native JSON support, does that mean it is faster to do
var i18nString = "{ /* some JSON */ }";
var i18n = JSON.parse(i18nString);
or
var 18n = { /* some JSON */ );
Or would the prior be faster and just use more memory?
On Jun 26, 10:10 am, Thomas Broyer <[email protected]> wrote:
> On 26 juin, 15:40, Jason <[email protected]> wrote:
>
> > Thanks for the tip; I think that's what I'm going to end up doing.
> > I'm just worried that since we're using an in-house library with
> > localized strings as well, I may be downloading strings that I don't
> > need. Not the end of the world, but I was wondering if anyone had
> > some better solutions.
>
> If you really worry about this, then you could make your own Constants
> interface with a generator to generate code that calls the Dictionary
> *and* emit the list of keys that you are actually using in the app.
> Then, use whichever language your want to make a script/program that
> builds the "dictionary JS file" from that file and the localized
> strings, keeping only the keys that are actually used by the app.
> Before deploying a new/modified locale, just run the script to make
> sure you're not deploying more localized strings than needed.
> (of course, the "script" might be the thing that respond to HTTP
> requests and generates the javascript "on the fly")
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---