Connecting Tech Pros Worldwide Forums | Help | Site Map

I18n for JavaScript

Guido Wesdorp
Guest
 
Posts: n/a
#1: Jul 23 '05
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

Dr John Stockton
Guest
 
Posts: n/a
#2: Jul 23 '05

re: I18n for JavaScript


JRS: In article <10v2rodqucksh59@corp.supernews.com>, dated Fri, 21 Jan
2005 22:06:10, seen in news:comp.lang.javascript, Guido Wesdorp
<guido@debris.demon.nl> posted :[color=blue]
>
>I've just released a JavaScript library to allow internationalizing
>JavaScript code and/or to do HTML translation from JavaScript.[/color]

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.
Matthew Lock
Guest
 
Posts: n/a
#3: Jul 23 '05

re: I18n for JavaScript


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.

Duncan Booth
Guest
 
Posts: n/a
#4: Jul 23 '05

re: I18n for JavaScript


Dr John Stockton wrote:
[color=blue]
> JRS: In article <10v2rodqucksh59@corp.supernews.com>, dated Fri, 21 Jan
> 2005 22:06:10, seen in news:comp.lang.javascript, Guido Wesdorp
><guido@debris.demon.nl> posted :[color=green]
>>
>>I've just released a JavaScript library to allow internationalizing
>>JavaScript code and/or to do HTML translation from JavaScript.[/color]
>
> Do you actually mean internationalising, with its meaning as in English,
> or do you mean multinationalising?[/color]

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.
[color=blue]
>
> The American language seems to treat the terms as equivalent, which is
> naive.[/color]

Did you mean naïve?
[color=blue]
>
> The true meaning of internationalising is converting to a single form;
> one which is understandable everywhere without ambiguity, and complies
> with applicable international standards.[/color]

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.
Dr John Stockton
Guest
 
Posts: n/a
#5: Jul 23 '05

re: I18n for JavaScript


JRS: In article <Xns95E862C20E0Dduncanrcpcouk@127.0.0.1>, dated Mon, 24
Jan 2005 09:42:41, seen in news:comp.lang.javascript, Duncan Booth
<duncan.booth@invalid.invalid> posted :[color=blue]
>Dr John Stockton wrote:
>[color=green]
>> JRS: In article <10v2rodqucksh59@corp.supernews.com>, dated Fri, 21 Jan
>> 2005 22:06:10, seen in news:comp.lang.javascript, Guido Wesdorp
>><guido@debris.demon.nl> posted :[color=darkred]
>>>
>>>I've just released a JavaScript library to allow internationalizing
>>>JavaScript code and/or to do HTML translation from JavaScript.[/color]
>>
>> Do you actually mean internationalising, with its meaning as in English,
>> or do you mean multinationalising?[/color]
>
>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.[/color]

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.
[color=blue][color=green]
>> The American language seems to treat the terms as equivalent, which is
>> naive.[/color]
>
>Did you mean naïve?[/color]

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.

[color=blue][color=green]
>> The true meaning of internationalising is converting to a single form;
>> one which is understandable everywhere without ambiguity, and complies
>> with applicable international standards.[/color]
>
>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.[/color]

That is not internationalisation; it is facilitation of
multinationalisation.
[color=blue]
>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.[/color]

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.
Matthew Lock
Guest
 
Posts: n/a
#6: Jul 23 '05

re: I18n for JavaScript


> 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.

Duncan Booth
Guest
 
Posts: n/a
#7: Jul 23 '05

re: I18n for JavaScript


Dr John Stockton wrote:
[color=blue]
> Duncan Booth posted :[/color]
[color=blue][color=green]
>>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.[/color]
>
> W3C is using Internationalization to mean Multinationalisation.
>[/color]
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):
[color=blue]
> multinational: a large business company which operates in several
> countries. (adj.) of this type of company. multiracial (S.Afr)[/color]

(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).
[color=blue]
> internationalize or -ise: to make international; to put under
> international control.[/color]
[color=blue]
> international: between nations or their representatives; transcending
> national limits; extending to several nations; ...[/color]

You wrote:[color=blue]
> The sensible aim is to have a single version which is understandable
> everywhere; that is true internationalisation.
>[/color]
Agreed, and I think i18n support is a step in that direction.
Dr John Stockton
Guest
 
Posts: n/a
#8: Jul 23 '05

re: I18n for JavaScript


JRS: In article <1106620333.822338.80870@f14g2000cwb.googlegroups. com>,
dated Mon, 24 Jan 2005 18:32:13, seen in news:comp.lang.javascript,
Matthew Lock <lockster@gmail.com> posted :[color=blue][color=green]
>> W3C is using Internationalization to mean Multinationalisation.[/color]
>
>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[/color]

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.

[color=blue]
>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.[/color]

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.
Jim Ley
Guest
 
Posts: n/a
#9: Jul 23 '05

re: I18n for JavaScript


On Tue, 25 Jan 2005 19:14:34 +0000, Dr John Stockton
<spam@merlyn.demon.co.uk> wrote:
[color=blue]
>JRS: In article <1106620333.822338.80870@f14g2000cwb.googlegroups. com>,
>dated Mon, 24 Jan 2005 18:32:13, seen in news:comp.lang.javascript,
>Matthew Lock <lockster@gmail.com> posted :[color=green][color=darkred]
>>> W3C is using Internationalization to mean Multinationalisation.[/color]
>>
>>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[/color]
>
>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.[/color]

Why should a collaboratively authored thing have a one-sided point of
view compared to something that is controlled by a single editor?
[color=blue][color=green]
>>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.[/color]
>
>We must not pander to the illiterate and incompetent.[/color]

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.
[color=blue]
>As you presumably have seen, we cannot tell from what the OP wrote
>whether he offers Internationalization or Multinationalisation or both.[/color]

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

Jim.
Dr John Stockton
Guest
 
Posts: n/a
#10: Jul 23 '05

re: I18n for JavaScript


JRS: In article <41f6d4d3.711961867@news.individual.net>, dated Tue, 25
Jan 2005 23:26:03, seen in news:comp.lang.javascript, Jim Ley
<jim@jibbering.com> posted :[color=blue]
>On Tue, 25 Jan 2005 19:14:34 +0000, Dr John Stockton
><spam@merlyn.demon.co.uk> wrote:
>[color=green]
>>JRS: In article <1106620333.822338.80870@f14g2000cwb.googlegroups. com>,
>>dated Mon, 24 Jan 2005 18:32:13, seen in news:comp.lang.javascript,
>>Matthew Lock <lockster@gmail.com> posted :[color=darkred]
>>>> 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[/color]
>>
>>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.[/color]
>
>Why should a collaboratively authored thing have a one-sided point of
>view compared to something that is controlled by a single editor?[/color]

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.

[color=blue][color=green][color=darkred]
>>>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.[/color]
>>
>>We must not pander to the illiterate and incompetent.[/color]
>
>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.
>[color=green]
>>As you presumably have seen, we cannot tell from what the OP wrote
>>whether he offers Internationalization or Multinationalisation or both.[/color]
>
>So, it's too late, that's a fact of the usage within the community,
>the clarfication can be obtained by simply asking.[/color]

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)
Jim Ley
Guest
 
Posts: n/a
#11: Jul 23 '05

re: I18n for JavaScript


On Wed, 26 Jan 2005 17:07:40 +0000, Dr John Stockton
<spam@merlyn.demon.co.uk> wrote:[color=blue]
>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.[/color]

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.
[color=blue]
>The usage is wrong.[/color]

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.
Matthew Lock
Guest
 
Posts: n/a
#12: Jul 23 '05

re: I18n for JavaScript


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?

Douglas Crockford
Guest
 
Posts: n/a
#13: Jul 23 '05

re: I18n for JavaScript


> Dictionaries don't attempt to show so-called proper usage, they[color=blue]
> 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?[/color]

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

http://www.crockford.com/javascript
Matthew Lock
Guest
 
Posts: n/a
#14: Jul 23 '05

re: I18n for JavaScript


What does being French have to do with the meaning of an English word?

Closed Thread