I18n for JavaScript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guido Wesdorp

    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
  • Dr John Stockton

    #2
    Re: I18n for JavaScript

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

    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.

    Comment

    • Matthew Lock

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

      Comment

      • Duncan Booth

        #4
        Re: I18n for JavaScript

        Dr John Stockton wrote:
        [color=blue]
        > JRS: In article <10v2rodqucksh5 9@corp.supernew s.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 internationaliz ing
        >>JavaScript code and/or to do HTML translation from JavaScript.[/color]
        >
        > Do you actually mean internationalis ing, with its meaning as in English,
        > or do you mean multinationalis ing?[/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 internationalis ing 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 Internationaliz ation
        Activity also known as I18N.

        Comment

        • Dr John Stockton

          #5
          Re: I18n for JavaScript

          JRS: In article <Xns95E862C20E0 Dduncanrcpcouk@ 127.0.0.1>, dated Mon, 24
          Jan 2005 09:42:41, seen in news:comp.lang. javascript, Duncan Booth
          <duncan.booth@i nvalid.invalid> posted :[color=blue]
          >Dr John Stockton wrote:
          >[color=green]
          >> JRS: In article <10v2rodqucksh5 9@corp.supernew s.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 internationaliz ing
          >>>JavaScript code and/or to do HTML translation from JavaScript.[/color]
          >>
          >> Do you actually mean internationalis ing, with its meaning as in English,
          >> or do you mean multinationalis ing?[/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 internationalis ing 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 internationalis ation; it is facilitation of
          multinationalis ation.
          [color=blue]
          >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.[/color]

          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.

          Comment

          • Matthew Lock

            #6
            Re: I18n for JavaScript

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



            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.

            Comment

            • Duncan Booth

              #7
              Re: I18n for JavaScript

              Dr John Stockton wrote:
              [color=blue]
              > Duncan Booth posted :[/color]
              [color=blue][color=green]
              >>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.[/color]
              >
              > W3C is using Internationaliz ation to mean Multinationalis ation.
              >[/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
              multinationalis ation. 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]
              > internationaliz e 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 internationalis ation.
              >[/color]
              Agreed, and I think i18n support is a step in that direction.

              Comment

              • Dr John Stockton

                #8
                Re: I18n for JavaScript

                JRS: In article <1106620333.822 338.80870@f14g2 000cwb.googlegr oups.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 Internationaliz ation to mean Multinationalis ation.[/color]
                >
                >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[/color]

                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.

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

                Comment

                • Jim Ley

                  #9
                  Re: I18n for JavaScript

                  On Tue, 25 Jan 2005 19:14:34 +0000, Dr John Stockton
                  <spam@merlyn.de mon.co.uk> wrote:
                  [color=blue]
                  >JRS: In article <1106620333.822 338.80870@f14g2 000cwb.googlegr oups.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 Internationaliz ation to mean Multinationalis ation.[/color]
                  >>
                  >>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[/color]
                  >
                  >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.[/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 Internationaliz ation or Multinationalis ation 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.

                  Comment

                  • Dr John Stockton

                    #10
                    Re: I18n for JavaScript

                    JRS: In article <41f6d4d3.71196 1867@news.indiv idual.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.d emon.co.uk> wrote:
                    >[color=green]
                    >>JRS: In article <1106620333.822 338.80870@f14g2 000cwb.googlegr oups.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 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[/color]
                    >>
                    >>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.[/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 Internationaliz ation or Multinationalis ation 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 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)

                    Comment

                    • Jim Ley

                      #11
                      Re: I18n for JavaScript

                      On Wed, 26 Jan 2005 17:07:40 +0000, Dr John Stockton
                      <spam@merlyn.de mon.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.

                      Comment

                      • Matthew Lock

                        #12
                        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?

                        Comment

                        • Douglas Crockford

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


                          Comment

                          • Matthew Lock

                            #14
                            Re: I18n for JavaScript

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

                            Comment

                            Working...