giangiammy wrote:
I need to develope a multilanguage application in javascript:
is there some particular library,
I don't know any.
or do you have some pointer to guidelines to follows: the messages
should if possible be keeped in a separate file, one for language.
Using one file per language compared to one file for all messages has
the advantage of quick loading of the application; it has the drawback
of requiring the application to reload (thereby losing all client-side
states unless backed up otherwise before, such as in a cookie or in a
server-side session variable) in order to change the user interface
language.
Is there some standard format?
No. But Object objects are your best bet, for example for a one-language
messages file:
var messages = {
msg_foobar: "This great Foo application frobnicates bar.",
...
}
You can then access the message with
messages.msg_foobar
or
messages["msg_foobar"]
where the latter is required if the property name is not an identifier.
HTH
PointedEars
--
Bill Gates isn't the devil -- Satan made sure hell
_worked_ before he opened it to the damned ...