Globalization problem

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

    #1

    Globalization problem

    Hi,

    I use the following code to set the current culture.

    If Not IsNothing(Sessi on("language") ) Then
    System.Threadin g.Thread.Curren tThread.Current Culture = New
    System.Globaliz ation.CultureIn fo(Session("lan guage").ToStrin g)

    End If

    If the users's browser (IE) is configured in the languages section to
    support Japanese (ja) I get the following error when I go on the page:

    Culture "ja" is a neutral culture. It can not be used in formatting and
    parsing and therefore cannot be set as the thread's current culture.
    Description: An unhandled exception occurred during the execution of the
    current web request. Please review the stack trace for more information
    about the error and where it originated in the code.

    Exception Details: System.NotSuppo rtedException: Culture "ja" is a neutral
    culture. It can not be used in formatting and parsing and therefore cannot
    be set as the thread's current culture.

    Source Error:

    An unhandled exception was generated during the execution of the
    current web request. Information regarding the origin and location of the
    exception can be identified using the exception stack trace below.

    Stack Trace:

    [NotSupportedExc eption: Culture "ja" is a neutral culture. It can not be
    used in formatting and parsing and therefore cannot be set as the thread's
    current culture.]
    System.Globaliz ation.CultureIn fo.CheckNeutral (CultureInfo culture) +110
    System.Threadin g.Thread.set_Cu rrentCulture(Cu ltureInfo value) +17
    ASPNetPortal.De sktopDefault.Pa ge_Init(Object sender, EventArgs e) +208
    System.Web.UI.C ontrol.OnInit(E ventArgs e) +67
    System.Web.UI.C ontrol.InitRecu rsive(Control namingContainer ) +235
    System.Web.UI.P age.ProcessRequ estMain() +171





    Any idea why this is hapening and what should I do would be much
    appreciated.
    Thanks,
    Florian Marinoiu












  • Nicole Calinoiu

    #2
    Re: Globalization problem

    Florian,

    Try providing the region information as well in order to create a specific
    culture rather than a neutral culture. e.g.: "ja-JP instead" of just "ja".

    HTH,
    Nicole


    "FM" <_@mail.com> wrote in message
    news:%23AD$MZ9l DHA.3700@TK2MSF TNGP11.phx.gbl. ..[color=blue]
    > Hi,
    >
    > I use the following code to set the current culture.
    >
    > If Not IsNothing(Sessi on("language") ) Then
    > System.Threadin g.Thread.Curren tThread.Current Culture = New
    > System.Globaliz ation.CultureIn fo(Session("lan guage").ToStrin g)
    >
    > End If
    >
    > If the users's browser (IE) is configured in the languages section to
    > support Japanese (ja) I get the following error when I go on the page:
    >
    > Culture "ja" is a neutral culture. It can not be used in formatting and
    > parsing and therefore cannot be set as the thread's current culture.
    > Description: An unhandled exception occurred during the execution of the
    > current web request. Please review the stack trace for more information
    > about the error and where it originated in the code.
    >
    > Exception Details: System.NotSuppo rtedException: Culture "ja" is a neutral
    > culture. It can not be used in formatting and parsing and therefore cannot
    > be set as the thread's current culture.
    >
    > Source Error:
    >
    > An unhandled exception was generated during the execution of the
    > current web request. Information regarding the origin and location of the
    > exception can be identified using the exception stack trace below.
    >
    > Stack Trace:
    >
    > [NotSupportedExc eption: Culture "ja" is a neutral culture. It can not be
    > used in formatting and parsing and therefore cannot be set as the thread's
    > current culture.]
    > System.Globaliz ation.CultureIn fo.CheckNeutral (CultureInfo culture) +110
    > System.Threadin g.Thread.set_Cu rrentCulture(Cu ltureInfo value) +17
    > ASPNetPortal.De sktopDefault.Pa ge_Init(Object sender, EventArgs e) +208
    > System.Web.UI.C ontrol.OnInit(E ventArgs e) +67
    > System.Web.UI.C ontrol.InitRecu rsive(Control namingContainer ) +235
    > System.Web.UI.P age.ProcessRequ estMain() +171
    >
    >
    >
    >
    >
    > Any idea why this is hapening and what should I do would be much
    > appreciated.
    > Thanks,
    > Florian Marinoiu
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >[/color]


    Comment

    • Nicole Calinoiu

      #3
      Re: Globalization problem

      Florian,

      Try providing the region information as well in order to create a specific
      culture rather than a neutral culture. e.g.: "ja-JP instead" of just "ja".

      HTH,
      Nicole


      "FM" <_@mail.com> wrote in message
      news:%23AD$MZ9l DHA.3700@TK2MSF TNGP11.phx.gbl. ..[color=blue]
      > Hi,
      >
      > I use the following code to set the current culture.
      >
      > If Not IsNothing(Sessi on("language") ) Then
      > System.Threadin g.Thread.Curren tThread.Current Culture = New
      > System.Globaliz ation.CultureIn fo(Session("lan guage").ToStrin g)
      >
      > End If
      >
      > If the users's browser (IE) is configured in the languages section to
      > support Japanese (ja) I get the following error when I go on the page:
      >
      > Culture "ja" is a neutral culture. It can not be used in formatting and
      > parsing and therefore cannot be set as the thread's current culture.
      > Description: An unhandled exception occurred during the execution of the
      > current web request. Please review the stack trace for more information
      > about the error and where it originated in the code.
      >
      > Exception Details: System.NotSuppo rtedException: Culture "ja" is a neutral
      > culture. It can not be used in formatting and parsing and therefore cannot
      > be set as the thread's current culture.
      >
      > Source Error:
      >
      > An unhandled exception was generated during the execution of the
      > current web request. Information regarding the origin and location of the
      > exception can be identified using the exception stack trace below.
      >
      > Stack Trace:
      >
      > [NotSupportedExc eption: Culture "ja" is a neutral culture. It can not be
      > used in formatting and parsing and therefore cannot be set as the thread's
      > current culture.]
      > System.Globaliz ation.CultureIn fo.CheckNeutral (CultureInfo culture) +110
      > System.Threadin g.Thread.set_Cu rrentCulture(Cu ltureInfo value) +17
      > ASPNetPortal.De sktopDefault.Pa ge_Init(Object sender, EventArgs e) +208
      > System.Web.UI.C ontrol.OnInit(E ventArgs e) +67
      > System.Web.UI.C ontrol.InitRecu rsive(Control namingContainer ) +235
      > System.Web.UI.P age.ProcessRequ estMain() +171
      >
      >
      >
      >
      >
      > Any idea why this is hapening and what should I do would be much
      > appreciated.
      > Thanks,
      > Florian Marinoiu
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >[/color]


      Comment

      • Nicole Calinoiu

        #4
        Re: Globalization problem

        Florian,

        Try providing the region information as well in order to create a specific
        culture rather than a neutral culture. e.g.: "ja-JP instead" of just "ja".

        HTH,
        Nicole


        "FM" <_@mail.com> wrote in message
        news:%23AD$MZ9l DHA.3700@TK2MSF TNGP11.phx.gbl. ..[color=blue]
        > Hi,
        >
        > I use the following code to set the current culture.
        >
        > If Not IsNothing(Sessi on("language") ) Then
        > System.Threadin g.Thread.Curren tThread.Current Culture = New
        > System.Globaliz ation.CultureIn fo(Session("lan guage").ToStrin g)
        >
        > End If
        >
        > If the users's browser (IE) is configured in the languages section to
        > support Japanese (ja) I get the following error when I go on the page:
        >
        > Culture "ja" is a neutral culture. It can not be used in formatting and
        > parsing and therefore cannot be set as the thread's current culture.
        > Description: An unhandled exception occurred during the execution of the
        > current web request. Please review the stack trace for more information
        > about the error and where it originated in the code.
        >
        > Exception Details: System.NotSuppo rtedException: Culture "ja" is a neutral
        > culture. It can not be used in formatting and parsing and therefore cannot
        > be set as the thread's current culture.
        >
        > Source Error:
        >
        > An unhandled exception was generated during the execution of the
        > current web request. Information regarding the origin and location of the
        > exception can be identified using the exception stack trace below.
        >
        > Stack Trace:
        >
        > [NotSupportedExc eption: Culture "ja" is a neutral culture. It can not be
        > used in formatting and parsing and therefore cannot be set as the thread's
        > current culture.]
        > System.Globaliz ation.CultureIn fo.CheckNeutral (CultureInfo culture) +110
        > System.Threadin g.Thread.set_Cu rrentCulture(Cu ltureInfo value) +17
        > ASPNetPortal.De sktopDefault.Pa ge_Init(Object sender, EventArgs e) +208
        > System.Web.UI.C ontrol.OnInit(E ventArgs e) +67
        > System.Web.UI.C ontrol.InitRecu rsive(Control namingContainer ) +235
        > System.Web.UI.P age.ProcessRequ estMain() +171
        >
        >
        >
        >
        >
        > Any idea why this is hapening and what should I do would be much
        > appreciated.
        > Thanks,
        > Florian Marinoiu
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >[/color]


        Comment

        • Nicole Calinoiu

          #5
          Re: Globalization problem

          Florian,

          Try providing the region information as well in order to create a specific
          culture rather than a neutral culture. e.g.: "ja-JP instead" of just "ja".

          HTH,
          Nicole


          "FM" <_@mail.com> wrote in message
          news:%23AD$MZ9l DHA.3700@TK2MSF TNGP11.phx.gbl. ..[color=blue]
          > Hi,
          >
          > I use the following code to set the current culture.
          >
          > If Not IsNothing(Sessi on("language") ) Then
          > System.Threadin g.Thread.Curren tThread.Current Culture = New
          > System.Globaliz ation.CultureIn fo(Session("lan guage").ToStrin g)
          >
          > End If
          >
          > If the users's browser (IE) is configured in the languages section to
          > support Japanese (ja) I get the following error when I go on the page:
          >
          > Culture "ja" is a neutral culture. It can not be used in formatting and
          > parsing and therefore cannot be set as the thread's current culture.
          > Description: An unhandled exception occurred during the execution of the
          > current web request. Please review the stack trace for more information
          > about the error and where it originated in the code.
          >
          > Exception Details: System.NotSuppo rtedException: Culture "ja" is a neutral
          > culture. It can not be used in formatting and parsing and therefore cannot
          > be set as the thread's current culture.
          >
          > Source Error:
          >
          > An unhandled exception was generated during the execution of the
          > current web request. Information regarding the origin and location of the
          > exception can be identified using the exception stack trace below.
          >
          > Stack Trace:
          >
          > [NotSupportedExc eption: Culture "ja" is a neutral culture. It can not be
          > used in formatting and parsing and therefore cannot be set as the thread's
          > current culture.]
          > System.Globaliz ation.CultureIn fo.CheckNeutral (CultureInfo culture) +110
          > System.Threadin g.Thread.set_Cu rrentCulture(Cu ltureInfo value) +17
          > ASPNetPortal.De sktopDefault.Pa ge_Init(Object sender, EventArgs e) +208
          > System.Web.UI.C ontrol.OnInit(E ventArgs e) +67
          > System.Web.UI.C ontrol.InitRecu rsive(Control namingContainer ) +235
          > System.Web.UI.P age.ProcessRequ estMain() +171
          >
          >
          >
          >
          >
          > Any idea why this is hapening and what should I do would be much
          > appreciated.
          > Thanks,
          > Florian Marinoiu
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >[/color]


          Comment

          Working...