By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,940 Members | 1,391 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,940 IT Pros & Developers. It's quick & easy.

I18n for JavaScript

P: n/a
Hi!

I've just released a JavaScript library to allow internationalizing
JavaScript code and/or to do HTML translation from JavaScript. It's a
first release, and it doesn't have all the features I'm interested in
(e.g. it doesn't support domains, although I don't think that's much of
a problem in most JavaScript applications, and it uses a non-standard
message catalog format, instead of .po files translations are stored in
XML) but it's quite usable.

The library works on Mozilla and Internet Explorer (it will probably
also work on Konqueror/Safari and Opera, but I didn't test those
browsers) and is released under a BSD-style license.

For more information and downloads, visit
http://johnnydebris.net/javascripts/i18n.js?frames=no.

Cheers,

Guido Wesdorp
Jul 23 '05 #1
Share this Question
Share on Google+
13 Replies


P: n/a
JRS: In article <10*************@corp.supernews.com>, dated Fri, 21 Jan
2005 22:06:10, seen in news:comp.lang.javascript, Guido Wesdorp
<gu***@debris.demon.nl> posted :

I've just released a JavaScript library to allow internationalizing
JavaScript code and/or to do HTML translation from JavaScript.


Do you actually mean internationalising, with its meaning as in English,
or do you mean multinationalising?

The American language seems to treat the terms as equivalent, which is
naive.

The true meaning of internationalising is converting to a single form;
one which is understandable everywhere without ambiguity, and complies
with applicable international standards.

Thus today's date internationalised becomes 2005-01-22; but
multinationalised it can also be 22/01/2005, 22.01.2005, 01/22/2005,
1/22/2005, 1/22/05 etc.

If your library allows multinationalising, it can easily provide
internationalising as well; just provide International as a pseudo-
location, and choose the formats by reference to proper standards
wherever such exist, and sagaciously for others.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #2

P: n/a
What does this have to do with the "American language"? (By which I
assume you mean the American dialect of English), the OP is from the
Netherlands.

Jul 23 '05 #3

P: n/a
Dr John Stockton wrote:
JRS: In article <10*************@corp.supernews.com>, dated Fri, 21 Jan
2005 22:06:10, seen in news:comp.lang.javascript, Guido Wesdorp
<gu***@debris.demon.nl> posted :

I've just released a JavaScript library to allow internationalizing
JavaScript code and/or to do HTML translation from JavaScript.
Do you actually mean internationalising, with its meaning as in English,
or do you mean multinationalising?


It isn't generally considered polite to chastise people posting on usenet
simply because their command of the English language as a secondary
language isn't as good as your primary language.

The American language seems to treat the terms as equivalent, which is
naive.
Did you mean nave?

The true meaning of internationalising is converting to a single form;
one which is understandable everywhere without ambiguity, and complies
with applicable international standards.


Which is what Guido's library does. It allows you to have a single
Javascript program which (with the addition of suitable translation files)
is understandable everywhere.

Specifically it allows your Javascript to use whatever support your
server already has in HTML or XML pages for the W3C Internationalization
Activity also known as I18N.
Jul 23 '05 #4

P: n/a
JRS: In article <Xn**************************@127.0.0.1>, dated Mon, 24
Jan 2005 09:42:41, seen in news:comp.lang.javascript, Duncan Booth
<du**********@invalid.invalid> posted :
Dr John Stockton wrote:
JRS: In article <10*************@corp.supernews.com>, dated Fri, 21 Jan
2005 22:06:10, seen in news:comp.lang.javascript, Guido Wesdorp
<gu***@debris.demon.nl> posted :

I've just released a JavaScript library to allow internationalizing
JavaScript code and/or to do HTML translation from JavaScript.
Do you actually mean internationalising, with its meaning as in English,
or do you mean multinationalising?


It isn't generally considered polite to chastise people posting on usenet
simply because their command of the English language as a secondary
language isn't as good as your primary language.


Education is not chastisement; and the Dutch in general are better at
English than the vast majority of British and American residents. He
used the American spelling; it is therefore appropriate to wonder
whether he intended the American meaning, or the proper one.
The American language seems to treat the terms as equivalent, which is
naive.


Did you mean nave?


For comprehension, yes, of course; for communication, no, since Usenet
is best done in the ISO-7 character set. Moreover, expecting the
difference to be readily visible is ageist. A good English dictionary
will show you that both forms are acceptable; so will Webster.

Don't try to be condescending; you lack the necessary ability.

The true meaning of internationalising is converting to a single form;
one which is understandable everywhere without ambiguity, and complies
with applicable international standards.


Which is what Guido's library does. It allows you to have a single
Javascript program which (with the addition of suitable translation files)
is understandable everywhere.


That is not internationalisation; it is facilitation of
multinationalisation.
Specifically it allows your Javascript to use whatever support your
server already has in HTML or XML pages for the W3C Internationalization
Activity also known as I18N.


W3C is using Internationalization to mean Multinationalisation.

The sensible aim is to have a single version which is understandable
everywhere; that is true internationalisation.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #5

P: n/a
> W3C is using Internationalization to mean Multinationalisation.

You might not be aware of this but pretty much all of the computer
industry uses Internationalisation, or i18n to mean that.

http://en.wikipedia.org/wiki/I18n

I see your point, but when everybody starts using a phrase incorrectly,
it has a habit of becomming the correct way to use a phrase very
rapidly.

Jul 23 '05 #6

P: n/a
Dr John Stockton wrote:
Duncan Booth posted :
Specifically it allows your Javascript to use whatever support your
server already has in HTML or XML pages for the W3C
Internationalization Activity also known as I18N.


W3C is using Internationalization to mean Multinationalisation.

I've trimmed most of the post to try and keep this at least vaguely
relevant. Frankly, I don't understand your definition of
multinationalisation. The only definition I know is this one (quoted from
Chambers):
multinational: a large business company which operates in several
countries. (adj.) of this type of company. multiracial (S.Afr)
(and to be honest I didn't know it could mean multiracial before today).

That doesn't match with what you are saying at all. I'm sure you are no
Humpty Dumpty, so can you give a source for your definition?

On the other hand, the following definitions seem to match the use Guido,
the W3C and myself make of the words(including giving -ize as the preferred
British spelling).
internationalize or -ise: to make international; to put under
international control. international: between nations or their representatives; transcending
national limits; extending to several nations; ...
You wrote: The sensible aim is to have a single version which is understandable
everywhere; that is true internationalisation.

Agreed, and I think i18n support is a step in that direction.
Jul 23 '05 #7

P: n/a
JRS: In article <11*********************@f14g2000cwb.googlegroups. com>,
dated Mon, 24 Jan 2005 18:32:13, seen in news:comp.lang.javascript,
Matthew Lock <lo******@gmail.com> posted :
W3C is using Internationalization to mean Multinationalisation.
You might not be aware of this but pretty much all of the computer
industry uses Internationalisation, or i18n to mean that.

http://en.wikipedia.org/wiki/I18n


The sort of "encyclopaedia" that is produced by computer users must be
expected to have rather a one-sided and unreliable point of view in
contrast with that of the major, authoritative, and reliable printed
dictionaries of the English language; or even that of Webster.

I see your point, but when everybody starts using a phrase incorrectly,
it has a habit of becomming the correct way to use a phrase very
rapidly.


We must not pander to the illiterate and incompetent.

Interpreting Internationalization to mean Multinationalisation is
linguistically damaging, since it leaves, where tolerated, no reasonable
way of distinguishing the one from the other.

As you presumably have seen, we cannot tell from what the OP wrote
whether he offers Internationalization or Multinationalisation or both.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #8

P: n/a
On Tue, 25 Jan 2005 19:14:34 +0000, Dr John Stockton
<sp**@merlyn.demon.co.uk> wrote:
JRS: In article <11*********************@f14g2000cwb.googlegroups. com>,
dated Mon, 24 Jan 2005 18:32:13, seen in news:comp.lang.javascript,
Matthew Lock <lo******@gmail.com> posted :
W3C is using Internationalization to mean Multinationalisation.
You might not be aware of this but pretty much all of the computer
industry uses Internationalisation, or i18n to mean that.

http://en.wikipedia.org/wiki/I18n


The sort of "encyclopaedia" that is produced by computer users must be
expected to have rather a one-sided and unreliable point of view in
contrast with that of the major, authoritative, and reliable printed
dictionaries of the English language; or even that of Webster.


Why should a collaboratively authored thing have a one-sided point of
view compared to something that is controlled by a single editor?
I see your point, but when everybody starts using a phrase incorrectly,
it has a habit of becomming the correct way to use a phrase very
rapidly.


We must not pander to the illiterate and incompetent.


Anyone quoting a descriptive dictionary to support usage that is out
of date I would certainly agree is incompetent, please stop, the usage
of i18n is well known, please ensure you use the same language as
others in the group, it very much helps.
As you presumably have seen, we cannot tell from what the OP wrote
whether he offers Internationalization or Multinationalisation or both.


So, it's too late, that's a fact of the usage within the community,
the clarfication can be obtained by simply asking.

Jim.
Jul 23 '05 #9

P: n/a
JRS: In article <41****************@news.individual.net>, dated Tue, 25
Jan 2005 23:26:03, seen in news:comp.lang.javascript, Jim Ley
<ji*@jibbering.com> posted :
On Tue, 25 Jan 2005 19:14:34 +0000, Dr John Stockton
<sp**@merlyn.demon.co.uk> wrote:
JRS: In article <11*********************@f14g2000cwb.googlegroups. com>,
dated Mon, 24 Jan 2005 18:32:13, seen in news:comp.lang.javascript,
Matthew Lock <lo******@gmail.com> posted :
W3C is using Internationalization to mean Multinationalisation.

You might not be aware of this but pretty much all of the computer
industry uses Internationalisation, or i18n to mean that.

http://en.wikipedia.org/wiki/I18n


The sort of "encyclopaedia" that is produced by computer users must be
expected to have rather a one-sided and unreliable point of view in
contrast with that of the major, authoritative, and reliable printed
dictionaries of the English language; or even that of Webster.


Why should a collaboratively authored thing have a one-sided point of
view compared to something that is controlled by a single editor?


Wikipedia pages are individually composed, and changed by other
individuals, all self-appointed.

A good dictionary may have a single editor-in-chief; but it will be
generated by a team carefully chosen to have the appropriate skills.
Therefore a good dictionary is considerably more trustworthy in
indicating the proper use of language.

I see your point, but when everybody starts using a phrase incorrectly,
it has a habit of becomming the correct way to use a phrase very
rapidly.


We must not pander to the illiterate and incompetent.


Anyone quoting a descriptive dictionary to support usage that is out
of date I would certainly agree is incompetent, please stop, the usage
of i18n is well known, please ensure you use the same language as
others in the group, it very much helps.
As you presumably have seen, we cannot tell from what the OP wrote
whether he offers Internationalization or Multinationalisation or both.


So, it's too late, that's a fact of the usage within the community,
the clarfication can be obtained by simply asking.


The usage is wrong. The English language enables drawing an accurate
distinction between using a standard form understandable world-wide,
which is internationalisation, and using multiple forms which, it is
hoped, be preferred in disparate localities, which is
multinationalisation.

The OP used "internationalizing" in a context where either meaning is
possible, and has not clarified his meaning. If the product is intended
to permit multinationalisation, then it needs a quasi-country setting
which selects for usage which is understood world-wide.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
Jul 23 '05 #10

P: n/a
On Wed, 26 Jan 2005 17:07:40 +0000, Dr John Stockton
<sp**@merlyn.demon.co.uk> wrote:
A good dictionary may have a single editor-in-chief; but it will be
generated by a team carefully chosen to have the appropriate skills.
Therefore a good dictionary is considerably more trustworthy in
indicating the proper use of language.
but languages don't have proper use that is fixed, they're a thing
that evolve, I suggest you read the preface to Samuel Johnson's
dictionary.
The usage is wrong.


No, languages evolve, dictionaries are descriptive, not prescriptive,
the word is well understood by many people in this thread, in fact
it's only you who has a problem with it.

Jim.
Jul 23 '05 #11

P: n/a
Dictionaries don't attempt to show so-called proper usage, they
describe the current usage of words. The key concept here is "describe"
as opposed to "prescribe".

Consider for example the word "apple". Around the 13th century the most
common usage for apple was to mean all fruits, not just what we now
know as an apple. But over time the French word "fruit" came to be used
to mean fruit, and apple changed to mean specifically what we know as
an apple. So which is the proper meaning of apple? All fruits, or just
the fruit we now know as the apple?

Jul 23 '05 #12

P: n/a
> Dictionaries don't attempt to show so-called proper usage, they
describe the current usage of words. The key concept here is "describe"
as opposed to "prescribe".

Consider for example the word "apple". Around the 13th century the most
common usage for apple was to mean all fruits, not just what we now
know as an apple. But over time the French word "fruit" came to be used
to mean fruit, and apple changed to mean specifically what we know as
an apple. So which is the proper meaning of apple? All fruits, or just
the fruit we now know as the apple?


That depends on whether or not you happen to be French.

http://www.crockford.com/javascript
Jul 23 '05 #13

P: n/a
What does being French have to do with the meaning of an English word?

Jul 23 '05 #14

This discussion thread is closed

Replies have been disabled for this discussion.