473,562 Members | 2,975 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I18n for JavaScript

Hi!

I've just released a JavaScript library to allow internationaliz ing
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
13 8637
JRS: In article <10************ *@corp.supernew s.com>, dated Fri, 21 Jan
2005 22:06:10, seen in news:comp.lang. javascript, Guido Wesdorp
<gu***@debris.d emon.nl> posted :

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


Do you actually mean internationalis ing, with its meaning as in English,
or do you mean multinationalis ing?

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

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

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

If your library allows multinationalis ing, it can easily provide
internationalis ing 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.c om/faq/> JL/RC: FAQ of news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #2
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
Dr John Stockton wrote:
JRS: In article <10************ *@corp.supernew s.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 internationaliz ing
JavaScript code and/or to do HTML translation from JavaScript.
Do you actually mean internationalis ing, with its meaning as in English,
or do you mean multinationalis ing?


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 naïve?

The true meaning of internationalis ing 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 Internationaliz ation
Activity also known as I18N.
Jul 23 '05 #4
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**********@i nvalid.invalid> posted :
Dr John Stockton wrote:
JRS: In article <10************ *@corp.supernew s.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 internationaliz ing
JavaScript code and/or to do HTML translation from JavaScript.
Do you actually mean internationalis ing, with its meaning as in English,
or do you mean multinationalis ing?


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 naïve?


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 internationalis ing 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 internationalis ation; it is facilitation of
multinationalis ation.
Specifically it allows your Javascript to use whatever support your
server already has in HTML or XML pages for the W3C Internationaliz ation
Activity also known as I18N.


W3C is using Internationaliz ation to mean Multinationalis ation.

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

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

You might not be aware of this but pretty much all of the computer
industry uses Internationalis ation, 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
Dr John Stockton wrote:
Duncan Booth posted :
Specificall y it allows your Javascript to use whatever support your
server already has in HTML or XML pages for the W3C
International ization Activity also known as I18N.


W3C is using Internationaliz ation to mean Multinationalis ation.

I've trimmed most of the post to try and keep this at least vaguely
relevant. Frankly, I don't understand your definition of
multinationalis ation. 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).
internationaliz e 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 internationalis ation.

Agreed, and I think i18n support is a step in that direction.
Jul 23 '05 #7
JRS: In article <11************ *********@f14g2 000cwb.googlegr oups.com>,
dated Mon, 24 Jan 2005 18:32:13, seen in news:comp.lang. javascript,
Matthew Lock <lo******@gmail .com> posted :
W3C is using Internationaliz ation to mean Multinationalis ation.
You might not be aware of this but pretty much all of the computer
industry uses Internationalis ation, or i18n to mean that.

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


The sort of "encyclopae dia" 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 Internationaliz ation to mean Multinationalis ation 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 Internationaliz ation or Multinationalis ation or both.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.c om/faq/> JL/RC: FAQ of news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #8
On Tue, 25 Jan 2005 19:14:34 +0000, Dr John Stockton
<sp**@merlyn.de mon.co.uk> wrote:
JRS: In article <11************ *********@f14g2 000cwb.googlegr oups.com>,
dated Mon, 24 Jan 2005 18:32:13, seen in news:comp.lang. javascript,
Matthew Lock <lo******@gmail .com> posted :
W3C is using Internationaliz ation to mean Multinationalis ation.
You might not be aware of this but pretty much all of the computer
industry uses Internationalis ation, or i18n to mean that.

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


The sort of "encyclopae dia" 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 Internationaliz ation or Multinationalis ation 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
JRS: In article <41************ ****@news.indiv idual.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.d emon.co.uk> wrote:
JRS: In article <11************ *********@f14g2 000cwb.googlegr oups.com>,
dated Mon, 24 Jan 2005 18:32:13, seen in news:comp.lang. javascript,
Matthew Lock <lo******@gmail .com> posted :
W3C is using Internationaliz ation to mean Multinationalis ation.

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

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


The sort of "encyclopae dia" 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
dictionarie s 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 Internationaliz ation or Multinationalis ation 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 internationalis ation, and using multiple forms which, it is
hoped, be preferred in disparate localities, which is
multinationalis ation.

The OP used "internationali zing" in a context where either meaning is
possible, and has not clarified his meaning. If the product is intended
to permit multinationalis ation, 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.demo n.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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2030
by: ProgDario | last post by:
HI, I downloaded and installed the I18N pear package, but the link on the doc referring to the DB is broken. Where can I find the I18N DB? Without it I can't make it work! Thanks in advance. :)ario
4
1947
by: Logan | last post by:
Is it possible to tell the wxPython widgets (e.g. file dialogs) to use another language (instead of English)? Thanks in advance for any hints! -- mailto: logan@phreaker(NoSpam).net
10
2967
by: Albretch | last post by:
.. Can you define the Character Set for particular tables instead of databases? . Which DBMSs would let you do that? . How do you store in a DBMS i18n'ed users' from input, coming over the web (basically from everywhere) store it and properly serve it back to users, . . .? . Can you point me to info on this? I would preferably use...
0
1249
by: Laszlo Zsolt Nagy | last post by:
Hello, I wonder if there is a standard for making i18n in Python projects. I have several Python projects that are internationalized. I also have Python packages with i18n. But it is still not clean to me what is the recommended way to do it. Currently, I use a module called 'localization.py' with this code: from i18n_domain import...
3
1625
by: Darren Davison | last post by:
Hi, I have a documentation tool based on Java and XSLT that I want to add i18n capability to. There are around 8 stylesheets that process a Source generated by the Java code and some of the static labels across the stylesheets are the same. Ideally I'd like to import a set of variables into each template, and preferably based on an XSLT...
8
1669
by: Alan J. Flavell | last post by:
OK, I guess I'm about ready to expose this page for public discussion: http://ppewww.ph.gla.ac.uk/~flavell/charset/i18n-weft.html Please concentrate on the content. I'm well aware that my old stylesheet is in need of modernisation, but this isn't the moment to get sidetracked by that. If anyone is previewing IE7 (which I am not), they...
0
1092
by: i18n-bounces | last post by:
Your mail to 'I18n' with the subject Mail Delivery (failure i18n@mova.org) Is being held until the list moderator can review it for approval. The reason it is being held: Post by non-member to a members-only list
3
1617
by: fyleow | last post by:
I just spent hours trying to figure out why even after I set my SQL table attributes to UTF-8 only garbage kept adding into the database. Apparently you need to execute "SET NAMES 'utf8'" before inserting into the tables. Does anyone have experience working with other languages using Django or Turbogears? I just need to be able to retrieve...
8
3194
by: CptDondo | last post by:
I have a small, embedded app that uses a webserver to serve up pages showing status, etc. Right now all the pages are hard-coded in English. We need to provide multi-lingual support. All of the pages are PHP generated. Ideally, I'd like for the PHP backend to serve up the language based a) the user's locale, and if that is not set, its...
0
7577
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7869
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7627
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6221
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5477
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3623
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3608
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1191
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.