Where to set uiCulture, culture ...

Discussion in 'ASP .Net' started by Henke, Aug 9, 2005.

  1. Henke

    Henke Guest

    Hi
    I'm building an globalized application (english, swedish and russian
    languages) and have a few questions:
    1. In order to see the russian characters correct I have to set the
    requestEncoding and responseEncoding to windows-1251. Is this correct?

    2. Now I set the requestEncoding and responseEncoding in the web.config
    file, but since I only have one web.config it only works for either english
    and swedish (utf-8 encoding) or just russian (windows-1251 encoding). So I
    guess I'm doing something wrong here, but what?

    3. I could set the culture an uiCulture to the Thread when I click each
    language link, which looks quite nice, but is this the way to do it?

    I really would appreciate some help...
    /Henke
     
    Henke, Aug 9, 2005
    #1
    1. Advertising

  2. Henke

    Arjen Guest

    Hi,

    Answer 1:
    Yes, http://en.wikipedia.org/wiki/Windows-1251

    Answer 2:
    Correct, you can add this inside the web.config or in each page.
    Chech this:
    http://beta.asp.net/QUICKSTART/aspnet/doc/localization/culture.aspx#ielanguage

    Answer 3:
    You can do this inside the global.asax file.
    Inside the method Application_BeginRequest.
    Check autoculture:
    http://beta.asp.net/QUICKSTART/aspnet/doc/localization/culture.aspx#autoculture

    Hope this helps,
    Arjen



    "Henke" <> schreef in bericht
    news:...
    > Hi
    > I'm building an globalized application (english, swedish and russian
    > languages) and have a few questions:
    > 1. In order to see the russian characters correct I have to set the
    > requestEncoding and responseEncoding to windows-1251. Is this correct?
    >
    > 2. Now I set the requestEncoding and responseEncoding in the web.config
    > file, but since I only have one web.config it only works for either
    > english and swedish (utf-8 encoding) or just russian (windows-1251
    > encoding). So I guess I'm doing something wrong here, but what?
    >
    > 3. I could set the culture an uiCulture to the Thread when I click each
    > language link, which looks quite nice, but is this the way to do it?
    >
    > I really would appreciate some help...
    > /Henke
    >
    >
     
    Arjen, Aug 9, 2005
    #2
    1. Advertising

  3. Henke

    Henke Guest

    Thanks for your answers. Though I still have some problems.
    1. Should I use any specific font?

    2. When I try to run my application in the russian language I have to set
    the requestEncoding, responseEncoding and fileEncoding in the web.config
    file, to have the text displayed correct. Since I have different pages for
    every language I would like to set this properties on a page level. In ASP
    ..NET 1.1 only responeseEncoding could be set in the Page directive. How
    should this be done in the best way?

    /Henke

    "Arjen" <> skrev i meddelandet
    news:dd9tum$662$1.ov.home.nl...
    > Hi,
    >
    > Answer 1:
    > Yes, http://en.wikipedia.org/wiki/Windows-1251
    >
    > Answer 2:
    > Correct, you can add this inside the web.config or in each page.
    > Chech this:
    > http://beta.asp.net/QUICKSTART/aspnet/doc/localization/culture.aspx#ielanguage
    >
    > Answer 3:
    > You can do this inside the global.asax file.
    > Inside the method Application_BeginRequest.
    > Check autoculture:
    > http://beta.asp.net/QUICKSTART/aspnet/doc/localization/culture.aspx#autoculture
    >
    > Hope this helps,
    > Arjen
    >
    >
    >
    > "Henke" <> schreef in bericht
    > news:...
    >> Hi
    >> I'm building an globalized application (english, swedish and russian
    >> languages) and have a few questions:
    >> 1. In order to see the russian characters correct I have to set the
    >> requestEncoding and responseEncoding to windows-1251. Is this correct?
    >>
    >> 2. Now I set the requestEncoding and responseEncoding in the web.config
    >> file, but since I only have one web.config it only works for either
    >> english and swedish (utf-8 encoding) or just russian (windows-1251
    >> encoding). So I guess I'm doing something wrong here, but what?
    >>
    >> 3. I could set the culture an uiCulture to the Thread when I click each
    >> language link, which looks quite nice, but is this the way to do it?
    >>
    >> I really would appreciate some help...
    >> /Henke
    >>
    >>

    >
    >
     
    Henke, Aug 9, 2005
    #3
  4. Henke

    Arjen Guest

    I don't know about the font.

    You can also use resource files.
    Each resource file will be a language file.
    Then you only need one webpage.
    Inside the global.asax file you set the language, culture and encoding type.
    The webpage automaticly reads the correct resource file.

    Hope this helps,
    Arjen



    "Henke" <> schreef in bericht
    news:...
    > Thanks for your answers. Though I still have some problems.
    > 1. Should I use any specific font?
    >
    > 2. When I try to run my application in the russian language I have to set
    > the requestEncoding, responseEncoding and fileEncoding in the web.config
    > file, to have the text displayed correct. Since I have different pages for
    > every language I would like to set this properties on a page level. In ASP
    > .NET 1.1 only responeseEncoding could be set in the Page directive. How
    > should this be done in the best way?
    >
    > /Henke
    >
    > "Arjen" <> skrev i meddelandet
    > news:dd9tum$662$1.ov.home.nl...
    >> Hi,
    >>
    >> Answer 1:
    >> Yes, http://en.wikipedia.org/wiki/Windows-1251
    >>
    >> Answer 2:
    >> Correct, you can add this inside the web.config or in each page.
    >> Chech this:
    >> http://beta.asp.net/QUICKSTART/aspnet/doc/localization/culture.aspx#ielanguage
    >>
    >> Answer 3:
    >> You can do this inside the global.asax file.
    >> Inside the method Application_BeginRequest.
    >> Check autoculture:
    >> http://beta.asp.net/QUICKSTART/aspnet/doc/localization/culture.aspx#autoculture
    >>
    >> Hope this helps,
    >> Arjen
    >>
    >>
    >>
    >> "Henke" <> schreef in bericht
    >> news:...
    >>> Hi
    >>> I'm building an globalized application (english, swedish and russian
    >>> languages) and have a few questions:
    >>> 1. In order to see the russian characters correct I have to set the
    >>> requestEncoding and responseEncoding to windows-1251. Is this correct?
    >>>
    >>> 2. Now I set the requestEncoding and responseEncoding in the web.config
    >>> file, but since I only have one web.config it only works for either
    >>> english and swedish (utf-8 encoding) or just russian (windows-1251
    >>> encoding). So I guess I'm doing something wrong here, but what?
    >>>
    >>> 3. I could set the culture an uiCulture to the Thread when I click each
    >>> language link, which looks quite nice, but is this the way to do it?
    >>>
    >>> I really would appreciate some help...
    >>> /Henke
    >>>
    >>>

    >>
    >>

    >
    >
     
    Arjen, Aug 9, 2005
    #4
  5. Henke

    Henke Guest

    Thanks Arjen, for your answers.
    I did it in an other way. Every russian page I save in signed unicode
    (UTF-8) format, both resx-files and cs-files. In that way all my charcters
    were saved in a correct way, and I didn't had to change the requestEncoding
    and responseEncoding in the web-config-file.

    /Henke

    "Henke" <> skrev i meddelandet
    news:...
    > Thanks for your answers. Though I still have some problems.
    > 1. Should I use any specific font?
    >
    > 2. When I try to run my application in the russian language I have to set
    > the requestEncoding, responseEncoding and fileEncoding in the web.config
    > file, to have the text displayed correct. Since I have different pages for
    > every language I would like to set this properties on a page level. In ASP
    > .NET 1.1 only responeseEncoding could be set in the Page directive. How
    > should this be done in the best way?
    >
    > /Henke
    >
    > "Arjen" <> skrev i meddelandet
    > news:dd9tum$662$1.ov.home.nl...
    >> Hi,
    >>
    >> Answer 1:
    >> Yes, http://en.wikipedia.org/wiki/Windows-1251
    >>
    >> Answer 2:
    >> Correct, you can add this inside the web.config or in each page.
    >> Chech this:
    >> http://beta.asp.net/QUICKSTART/aspnet/doc/localization/culture.aspx#ielanguage
    >>
    >> Answer 3:
    >> You can do this inside the global.asax file.
    >> Inside the method Application_BeginRequest.
    >> Check autoculture:
    >> http://beta.asp.net/QUICKSTART/aspnet/doc/localization/culture.aspx#autoculture
    >>
    >> Hope this helps,
    >> Arjen
    >>
    >>
    >>
    >> "Henke" <> schreef in bericht
    >> news:...
    >>> Hi
    >>> I'm building an globalized application (english, swedish and russian
    >>> languages) and have a few questions:
    >>> 1. In order to see the russian characters correct I have to set the
    >>> requestEncoding and responseEncoding to windows-1251. Is this correct?
    >>>
    >>> 2. Now I set the requestEncoding and responseEncoding in the web.config
    >>> file, but since I only have one web.config it only works for either
    >>> english and swedish (utf-8 encoding) or just russian (windows-1251
    >>> encoding). So I guess I'm doing something wrong here, but what?
    >>>
    >>> 3. I could set the culture an uiCulture to the Thread when I click each
    >>> language link, which looks quite nice, but is this the way to do it?
    >>>
    >>> I really would appreciate some help...
    >>> /Henke
    >>>
    >>>

    >>
    >>

    >
    >
     
    Henke, Aug 12, 2005
    #5
  6. Henke

    shailpatel83

    Joined:
    Jun 11, 2009
    Messages:
    9
    Culture And UICulture in Asp.net

    UICulture value determines what resource file ASP.NET needs to load. That drives all the content of the website.

    Culture value determines the results of culture-dependent functions, such as the date, number, and currency formatting, and so on.

    It is NOT necessary that you need to have both values are same. You can set different values as per your application needs. Good example is that Web Auction web site. You won’t to display english text for english speaking country but you might want to display spanish text for spanish speaking country. This setting is UICulture. But there is one thing that would stay constant “currency” for both english or spanish speaking country. This setting is Culture.

    For more details here is link that might help you http: patelshailesh.com/index.php/culture-and-uiculture-in-asp-net
     
    shailpatel83, Feb 24, 2010
    #6
    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. =?Utf-8?B?U2FtdWVs?=
    Replies:
    5
    Views:
    2,667
    Steven Cheng[MSFT]
    Aug 8, 2005
  2. =?ISO-8859-1?Q?Roland_M=FCller?=
    Replies:
    1
    Views:
    1,632
    =?ISO-8859-1?Q?Roland_M=FCller?=
    Nov 21, 2005
  3. Replies:
    4
    Views:
    11,368
    =?Utf-8?B?RGF2?=
    Jul 10, 2006
  4. Klaus Jensen

    Setting UIculture in code

    Klaus Jensen, Jun 15, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    529
    Brock Allen
    Jun 17, 2006
  5. Savvoulidis Iordanis
    Replies:
    2
    Views:
    821
    Alexey Smirnov
    Jun 30, 2009
Loading...

Share This Page