Where to set uiCulture, culture ...

H

Henke

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
 
H

Henke

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
 
A

Arjen

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
 
H

Henke

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
 
Joined
Jun 11, 2009
Messages
9
Reaction score
0
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top