Regional settings

Discussion in 'HTML' started by Ike, Apr 19, 2005.

  1. Ike

    Ike Guest

    Is anyone aware of a means to determine the default country_local (the
    iso-spec, e.g. 'en_US') for a given local computer, such as someone might
    have specified in Windows under Control Panel - Regional and Language
    Options ?
    Ike, Apr 19, 2005
    #1
    1. Advertising

  2. "Ike" <> wrote:

    > Is anyone aware of a means to determine the default country_local
    > (the iso-spec, e.g. 'en_US') for a given local computer, such as
    > someone might have specified in Windows under Control Panel -
    > Regional and Language Options ?


    What makes you think this question has the slightest connection
    with HTML?

    (Anyway, why don't you look at the settings, if you know where they can
    be changed? You can also see the current settings there!!)

    ((If your question is in some mysterious way connected with HTML, the
    primary answer is "Don't". That spells "you have completely misanalyzed
    your problem, bud" and "tell us what you are really doing".))

    (((Besides, en_US is a name for a language locale, namely the US
    variant of English.)))

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    Jukka K. Korpela, Apr 19, 2005
    #2
    1. Advertising

  3. Ike

    Ike Guest

    Trying to discern the ISO country_LOCALE codes to make a site open in the
    language which is specified as the default on a local machine which IS known
    by the browser, bud (where did you get that 'US variant' jingoism from
    anyhow, bud?)

    Given that, it is entirely POSSIBLE that this MAY be specified in a CONSTANT
    somewhere, bud.

    Sorry to intrude on your newgroup, bud. -Ike

    "Jukka K. Korpela" <> wrote in message
    news:Xns963DA91C0AA13jkorpelacstutfi@193.229.0.31...
    > "Ike" <> wrote:
    >
    > > Is anyone aware of a means to determine the default country_local
    > > (the iso-spec, e.g. 'en_US') for a given local computer, such as
    > > someone might have specified in Windows under Control Panel -
    > > Regional and Language Options ?

    >
    > What makes you think this question has the slightest connection
    > with HTML?
    >
    > (Anyway, why don't you look at the settings, if you know where they can
    > be changed? You can also see the current settings there!!)
    >
    > ((If your question is in some mysterious way connected with HTML, the
    > primary answer is "Don't". That spells "you have completely misanalyzed
    > your problem, bud" and "tell us what you are really doing".))
    >
    > (((Besides, en_US is a name for a language locale, namely the US
    > variant of English.)))
    >
    > --
    > Yucca, http://www.cs.tut.fi/~jkorpela/
    > Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    >
    >
    Ike, Apr 19, 2005
    #3
  4. Ike

    Dan Guest

    Ike wrote:
    > Trying to discern the ISO country_LOCALE codes to make a site open in

    the
    > language which is specified as the default on a local machine which

    IS known
    > by the browser, bud (where did you get that 'US variant' jingoism

    from
    > anyhow, bud?)


    Why don't you use the HTTP "Accept-Language" header, which is actually
    designed for that particular purpose, rather than trying to reinvent
    this wheel by attempting to determine other, only partially-related,
    system settings that have nothing intrinsically to do with the Web?

    More info: http://webtips.dan.info/language.html

    Don't top-post. http://mailformat.dan.info/quoting/top-posting.html

    --
    Dan
    Dan, Apr 19, 2005
    #4
  5. Ike

    Andy Dingley Guest

    On Tue, 19 Apr 2005 13:18:23 GMT, "Ike" <> wrote:

    >Is anyone aware of a means to determine the default country_local


    As an approximation this is probably in the headers of the HTTP request,
    as a list in the Accept-Language header. Read the RFC for details of how
    these are encoded.

    Be aware that these are browser settings, probably derived from the OS
    settings at the time and for the user who first installed the browser.
    They may be far from accurate.

    With some simple scripting on the server, it's easy to control the
    site's behaviour on the basis of this header. But remember that they're
    unreliable, particularly for multiple users on the same machine. Use
    them to drive defaults, by all means, but always allow the user to
    choose a different language and overwrite these settings.
    Andy Dingley, Apr 19, 2005
    #5
  6. "Ike" <> wrote:

    > Trying to discern the ISO country_LOCALE codes to make a site open
    > in the language which is specified as the default on a local
    > machine which IS known by the browser, bud


    I sort-of knew that's what you had in your mind. What you wrote was
    completely different.

    This is a common case of taking much trouble to create problems by
    using wrong tools to address the wrong problem.

    > (where did you get that
    > 'US variant' jingoism from anyhow, bud?)


    I know what I'm talking about; you don't.

    > Given that, it is entirely POSSIBLE that this MAY be specified in a
    > CONSTANT somewhere, bud.


    You really have no clue.

    > Sorry to intrude on your newgroup, bud. -Ike


    The exit door is there ==========>.

    Thank you in advance. Have a nice day. The reason for not telling the
    right question and the right answer is that you are clearly not
    prepared to trying to understand them. Of course, you also misbehave
    and act as a fool, but I treat that just as one evidence of your
    decidedness to remain ignorant.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    Jukka K. Korpela, Apr 19, 2005
    #6
  7. Ike

    Ike Guest

    I'll just do it as an applet, write it as a cookie, read it in that way. I
    thought there was a more html-centric way to discern this, evidently not.
    Glad I got under your skin tho, Jukka, and if you ever happen to wander into
    the Java groups, I'll be looking for you too. -Ike
    Ike, Apr 20, 2005
    #7
  8. Ike wrote:
    > I'll just do it as an applet, write it as a cookie, read it in that way. I
    > thought there was a more html-centric way to discern this, evidently not.
    > Glad I got under your skin tho, Jukka, and if you ever happen to wander into
    > the Java groups, I'll be looking for you too. -Ike


    Why not just use HTTP language negotiation with the "Accept-Language"
    header?

    --
    == Dan ==
    Dan's Mail Format Site: http://mailformat.dan.info/
    Dan's Web Tips: http://webtips.dan.info/
    Dan's Domain Site: http://domains.dan.info/
    Daniel R. Tobias, Apr 20, 2005
    #8
  9. Ike

    Andy Dingley Guest

    On Tue, 19 Apr 2005 14:33:24 GMT, "Ike" <> wrote:

    > (where did you get that 'US variant' jingoism from
    >anyhow, bud?)


    "en" is English (the ISO 639 series for languages)

    "en_US" is "American English", the concatenation of the ISO 639 language
    code and something that might be an ISO 3166 country code. It could also
    contain x_klingon, en_geordie, or la_sci

    HTTP doesn't care about "country locale" as a desktop OS might. It just
    doesn't care where you're doing it from, only what language you might
    want to do it in.

    If you sniff for exact matches on language code alone, then my browser
    will send you an en_GB that you might incorrectly ignore, because it
    doesn't contain "US"
    Andy Dingley, Apr 20, 2005
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. René de Leeuw

    Regional settings

    René de Leeuw, Jul 2, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    564
    René de Leeuw
    Jul 2, 2003
  2. Lachlan James

    problem with regional & language settings

    Lachlan James, Aug 5, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    558
    Lachlan James
    Aug 5, 2003
  3. Phil
    Replies:
    0
    Views:
    589
  4. Karunakararao
    Replies:
    0
    Views:
    630
    Karunakararao
    May 11, 2004
  5. donet programmer
    Replies:
    3
    Views:
    1,519
    Gregory A. Beamer
    Nov 20, 2009
Loading...

Share This Page