473,785 Members | 2,391 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bilingual Site. Best practices

I have an English site I need to make available in Spanish. Ideally
there will be a preset switch in the users profile to indicate they
would like to see the site in Spanish.

My first inclination is to make a copy of the site redirect them after
the login.

Outside of doing it this way, or purchasing/using third party
products or controls that deal with localization and maybe use xml to
drive those controls dynamically. Is their an easy way to handle this
in native asp.net 2.0?

As a simple example, say I have a bunch of asp:Labels with hard coded
text= properties in my markup. Is the technique to basically set these
in the codebhind based on the selected language? Is that the typical
and expected route? If so, sound kinda painful and I'd almost rather
maintain a separate site.

Thanks for any help or information.

Nov 10 '07 #1
3 4470
"jobs" <jo**@webdos.co mwrote in message
news:11******** *************@5 0g2000hsm.googl egroups.com...
Thanks for any help or information.
The usual method for this is to use resource files:
http://www.google.co.uk/search?sourc...resource+files
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 10 '07 #2
Nice! I just did a simple vb.net asp.net project to test it. And do
see it using the generated resx file over fixed values on my markup.
Dumb question, I made a copy of the that as resx file .. called it
NEW.aspx.resx file under the App_LocalResour ces folder. Now how do I
get my site to use the alternative resx file? I won't be using the
browser setting to drive which language will be used. I will want to
control that from a setting in the users profile.

Also, where would be a place to make that switch? any chance I could
make it only once and it would stay set for the duration of the
session for all pages called by that session? or will each page's
codebehind have to check for that and set it?
Thanks in advance!
Nov 10 '07 #3
re:
!how do I get my site to use the alternative resx file?

http://www.codeproject.com/useritems...balization.asp

!I won't be using the browser setting to drive which language will be used.
!I will want to control that from a setting in the users profile.

Globalization natively uses the browser setting to determine which resx file to use.

To do it the way you want to, you'll need to use a different method.

Many people save the language translations in different database columns,
and have the user select ( or make it a profile option ) the language desired.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== ========
"jobs" <jo**@webdos.co mwrote in message news:11******** **************@ c30g2000hsa.goo glegroups.com.. .
Nice! I just did a simple vb.net asp.net project to test it. And do
see it using the generated resx file over fixed values on my markup.
Dumb question, I made a copy of the that as resx file .. called it
NEW.aspx.resx file under the App_LocalResour ces folder. Now how do I
get my site to use the alternative resx file? I won't be using the
browser setting to drive which language will be used. I will want to
control that from a setting in the users profile.

Also, where would be a place to make that switch? any chance I could
make it only once and it would stay set for the duration of the
session for all pages called by that session? or will each page's
codebehind have to check for that and set it?
Thanks in advance!


Nov 10 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

30
3525
by: Gustaf Liljegren | last post by:
I'm working with some semi-advanced tables with lots of decimal numbers in, and I can't get the alignment to work. http://www.algonet.se/~gustafl/temp/output_ib.html I want numbers aligned to the decimal point. The HTML 4 spec says User agents doesn't need to support 'char' and 'charoff', so I wonder if the problem is lack of support? If so, can the same results be achieved in another way?
6
1916
by: Tim | last post by:
I am in the process of moving a site from one hosting company to another. This site is fairly large, with hundreds of asp files, each with multiple "include" statements. The new host has a different webspace folder structure for it's clients than the old host. At the moment, this is forcing me to have to append all the paths for all the include statements (not to mention all the other path-related code) to make things work. Example:
2
1909
by: Tim | last post by:
I am doing a small asp webshop and want to make it atleast bi-lingual. I have thought of a few ways to do this but would like to have a second opinion on what you think is the best way. I have browsed the Google archives and seen this question pop up a few times before but never with any particulary good answers. For some reason this doesn't seem like a hot topic. I am not talking about the product information, that is already stored...
136
9457
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to use. The above URL is version 1.0 (draft) that resulted. IMO, it is not a replacement for the FAQ,...
9
1759
by: dale zhang | last post by:
Hi, Anybody here has experience to build a english/chinese web? The chap 15 in Developing Web Applications tells sth about how to do this, but I want to know more details. It seems detect and redirect are the way for me to do this. Does this mean I have to have image button on the main page to link to chinese pages? all chinese pages will duplicate english ones? the following is from the book,
2
1626
by: Carl Gilbert | last post by:
Hi I was looking to build an E-Commerce web site using ASP.NET. I work with VB.NET and know some HTML so I imagine the learning curve for ASP.NET shouldn't be too steep. I was looking for the best way to approach this task and came across the IBuySpy starter pack from Microsoft but felt the design fell somewhat short of the offerings from something like www.oscommerce.com I then found www.dotnetnuke.com but this seemed more like...
5
3309
by: will | last post by:
I have a php/mysql site and I am wondering if anyone has suggestions about strategies for making it bilingual or resources on how to do this. I thought of one way which would be to replace the text with calls to a database which has all the text in it. But I would prefer to have a single file with phrases and then just be able to translate that single file into another language to produce a site in another language. Any ideas would be...
5
1764
by: JT | last post by:
Hi, I think I need a "best practices" lesson on web sites and web services. In order to conform to the restraints of my web host, my web services seem to need to be in a subfolder of my web site. So if I have a wwwroot folder containing my site, which maps to www.MySite.com, then to reference my web service, MyService, I place it in a folder that maps to wwwroot/MyService/MyService.asmx. This is dandy. I reference it by using the...
5
1650
Jacotheron
by: Jacotheron | last post by:
I have a problem again. I have a 2 sites for one of my customers. The site is English and Afrikaans. The English site is parked on the Afrikaans site. The script should check to see if the page is accessed through the correct domain. If it is not accessed through the correct domain, it should redirect to the correct domain and create a cookie to always return to the correct domain. Here is an example: Someone enters the site through...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.