Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Internationalization in ASP.NET

Reply
Thread Tools

Internationalization in ASP.NET

 
 
Kiran A K
Guest
Posts: n/a
 
      03-02-2006
Hi,

i want my web application to support several languages (like english,
russian, danish etc).
how do i achieve this in ASP.NET?

the application should automatically detect the client's locale and then
display the web pages
in the appropriate language.
is it possible to have separate language files for each language?
in each of these files i would like to specify all the text strings used in
the application.

actually i from Java background and in Struts there is a concept of resource
bundles.
Resource bundles are nothing but separate language files for each language
containing all
the text strings used in the application.

regards,
Kiran


 
Reply With Quote
 
 
 
 
John Timney \( MVP \)
Guest
Posts: n/a
 
      03-02-2006
Start here, see if it gives you an idea

http://msdn.microsoft.com/library/de...calization.asp

--
Regards

John Timney
Microsoft MVP

"Kiran A K" <> wrote in message
news:ezz2$$...
> Hi,
>
> i want my web application to support several languages (like english,
> russian, danish etc).
> how do i achieve this in ASP.NET?
>
> the application should automatically detect the client's locale and then
> display the web pages
> in the appropriate language.
> is it possible to have separate language files for each language?
> in each of these files i would like to specify all the text strings used
> in the application.
>
> actually i from Java background and in Struts there is a concept of
> resource bundles.
> Resource bundles are nothing but separate language files for each language
> containing all
> the text strings used in the application.
>
> regards,
> Kiran
>



 
Reply With Quote
 
 
 
 
vinu
Guest
Posts: n/a
 
      03-02-2006
Hi..
Check the following site...
http://www.c-sharpcorner.com/UploadF...b-1c68b05eb2e1

vinu
"Kiran A K" <> wrote in message
news:ezz2$$...
> Hi,
>
> i want my web application to support several languages (like english,
> russian, danish etc).
> how do i achieve this in ASP.NET?
>
> the application should automatically detect the client's locale and then
> display the web pages
> in the appropriate language.
> is it possible to have separate language files for each language?
> in each of these files i would like to specify all the text strings used
> in the application.
>
> actually i from Java background and in Struts there is a concept of
> resource bundles.
> Resource bundles are nothing but separate language files for each language
> containing all
> the text strings used in the application.
>
> regards,
> Kiran
>



 
Reply With Quote
 
Karl Seguin [MVP]
Guest
Posts: n/a
 
      03-02-2006
The links provided by John's and Vinu's are great if you want to use the
built-in methods. But any serious multilingual development is going to run
into a number of problems with the basic approach. I have a 3 parter that's
been well established as the real way to build multilingual ASP.NET
websites:

http://openmymind.net/index.aspx?documentId=3
http://openmymind.net/index.aspx?documentId=4
http://openmymind.net/index.aspx?documentId=52

Karl
--
http://www.openmymind.net/
http://www.fuelindustries.com/


"Kiran A K" <> wrote in message
news:ezz2$$...
> Hi,
>
> i want my web application to support several languages (like english,
> russian, danish etc).
> how do i achieve this in ASP.NET?
>
> the application should automatically detect the client's locale and then
> display the web pages
> in the appropriate language.
> is it possible to have separate language files for each language?
> in each of these files i would like to specify all the text strings used
> in the application.
>
> actually i from Java background and in Struts there is a concept of
> resource bundles.
> Resource bundles are nothing but separate language files for each language
> containing all
> the text strings used in the application.
>
> regards,
> Kiran
>



 
Reply With Quote
 
Maury
Guest
Posts: n/a
 
      03-02-2006
Karl Seguin [MVP] ha scritto:
> The links provided by John's and Vinu's are great if you want to use the
> built-in methods. But any serious multilingual development is going to run
> into a number of problems with the basic approach.

I watched at your links but I have a further question for you:
in my simple site I ovverride the method InitializeCulture
of a page I would like to do this
after the user clicks on a button, but the
button_click event raises after the InitializeCulture
event so I have to click twice to view the new language...

Do you know how can I fix this without using URL rewriting
you explain in your article?

Thanks!
M.
 
Reply With Quote
 
Karl Seguin [MVP]
Guest
Posts: n/a
 
      03-02-2006
You've run into a common problem. The timing issue is quite problematic.
There aren't any good ways unfortunetly. One thing you can do is use the
Request.Form[] variable in your initializeCulture. You can use it to
pre-emptively see if the button was clicked, and if so switch the culture -
this is a throw back to how we programmed in classic ASP or how it's done in
PHP - it's quite effective actually.


karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/


"Maury" <maurizio.alberti_TOGLI_@gmail.com> wrote in message
news:m%CNf.15794$...
> Karl Seguin [MVP] ha scritto:
>> The links provided by John's and Vinu's are great if you want to use the
>> built-in methods. But any serious multilingual development is going to
>> run into a number of problems with the basic approach.

> I watched at your links but I have a further question for you:
> in my simple site I ovverride the method InitializeCulture
> of a page I would like to do this
> after the user clicks on a button, but the
> button_click event raises after the InitializeCulture
> event so I have to click twice to view the new language...
>
> Do you know how can I fix this without using URL rewriting
> you explain in your article?
>
> Thanks!
> M.



 
Reply With Quote
 
Maury
Guest
Posts: n/a
 
      03-03-2006
Karl Seguin [MVP] ha scritto:
> You've run into a common problem.

fantastic

> There aren't any good ways unfortunetly.

....

> One thing you can do is ...

I tried to use Javascript: the image (with the flag)
has a javascript function (onclick event, client side)
in this function I write the culture
into an hidden field (with runat=server)
then in InitializeCulture I read the hidden field...
I have some problem with Javascript but I think this
can be a solution (even if there are some drawbacks...
for example if the borwser ha javascript disable)
Do you think that this can be a solution?

> karl

Thanks
M.

 
Reply With Quote
 
Karl Seguin [MVP]
Guest
Posts: n/a
 
      03-03-2006
yes, I think it'd be a good one. Just do Request.Form["hiddenFieldName"] to
get your culture and voila

Good idea!

Karl
--
http://www.openmymind.net/
http://www.fuelindustries.com/


"Maury" <maurizio.alberti_TOGLI_@gmail.com> wrote in message
news:KtSNf.16251$...
> Karl Seguin [MVP] ha scritto:
>> You've run into a common problem.

> fantastic
>
>> There aren't any good ways unfortunetly.

> ...
>
>> One thing you can do is ...

> I tried to use Javascript: the image (with the flag)
> has a javascript function (onclick event, client side)
> in this function I write the culture
> into an hidden field (with runat=server)
> then in InitializeCulture I read the hidden field...
> I have some problem with Javascript but I think this
> can be a solution (even if there are some drawbacks...
> for example if the borwser ha javascript disable)
> Do you think that this can be a solution?
>
>> karl

> Thanks
> M.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
internationalization without using resource files Jules ASP .Net 3 05-25-2005 08:28 AM
internationalization of Apps ???? =?Utf-8?B?UGl5dXNoIEdvdmls?= ASP .Net 0 06-02-2004 05:21 AM
internationalization problem continues. Francois Malgreve ASP .Net 0 12-29-2003 08:32 AM
Re: internationalization problem Natty Gur ASP .Net 1 12-23-2003 08:00 AM
Internationalization Problem Pablo Jose Almeida da Guia ASP .Net 0 12-05-2003 12:23 PM



Advertisments