I posted a question in Google Closure discussion forum related to dynamic
localizations. This is the answer which I get,

"*I think if you want real-time switching, goog.getMsg might not be for
you. It's designed so that you can create language-specific javascript
files. So you'd end with foo.en.js, foo.fr.js, etc, which would
contain your full application, but with goog.getMsg returning the
"right" one (and in fact, the values inlined into the code). This
becomes even more fun when you have modules, since there's a
per-language per-module js file. However to switch languages, you
would have to reload the whole application.

If you really want to be able to switch dynamically, you might benefit
from a manual approach where you have a translations["en"] dict, etc
for each language, and the current language is stored in some
variable. There are ways to get this to work reasonably with soy as
well, since you can reference global variables there. But sadly you do
lose the ability to use {msg}.*"

Thus what we should do? Adopting a native javascript kind of a way to do
localization?

Thanks!


On Fri, Sep 6, 2013 at 12:49 AM, Andun Sameera <andun...@gmail.com> wrote:

> I tried to find some material related to localization. But finding help
> for Closure is a tough task. Cant we use a normal Javascript way to handle
> run-time change of languages?
>
>
> On Thu, Sep 5, 2013 at 6:19 PM, Bogdanov Andrey <ba...@mail.ru> wrote:
>
>> Hi Andun,
>>
>> I've push a version which allows to clear background.
>> You could call board.setBackground() or  board.setBackground('')  - it
>> will work
>>
>> Also I've surrounded all nessages with goog.getMsg call, so we could add
>> internationalization.
>>
>> Regards,
>> Andrey
>>
>>
>>
>>
>> Среда, 4 сентября 2013, 22:51 +05:30 от Andun Sameera <andun...@gmail.com
>> >:
>>
>>   I have re-factored the code and committed. Also I have added undo for
>> DOC
>> addition, page navigation. Also there is another small problem which
>> Andrey
>> can answer me. How can we go to a empty background from? I tired to set a
>> "" as the url. But didn't work.
>>
>> Thanks!
>>
>>
>>
>>
>>
>
>
> --
> Regards
> Andun S.L. Gunawardana
> Undergraduate
> Department of Computer Science And Engineering
> University of Moratuwa
> Sri Lanka
>
> Blog - http://www.insightforfuture.blogspot.com/
> LinkedIn - http://www.linkedin.com/pub/andun-s-l-gunawardana/34/646/703
> Twitter -http://twitter.com/AndunSLG
>
>
>
>
>



-- 
Regards
Andun S.L. Gunawardana
Undergraduate
Department of Computer Science And Engineering
University of Moratuwa
Sri Lanka

Blog - http://www.insightforfuture.blogspot.com/
LinkedIn - http://www.linkedin.com/pub/andun-s-l-gunawardana/34/646/703
Twitter -http://twitter.com/AndunSLG

Reply via email to