Developing a site with multiple languages EN/FR/GR/ etc...

0 views
Skip to first unread message

T.K.

unread,
Aug 15, 2009, 9:18:50 AM8/15/09
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hi all,

please advise what is the best practice to develop a site with
multiple languages English, French , German, etc....

If my site is the same and I just want to change the field names and
text on the page as per the chosen language which technique is better:

is it to save the field names in an xml file and read it each time
someone chooses french, or is it
querying the fields from sql 2005 (but i guess it will slow down the
site load).

or is there any better specific way of doing this, I'm searching for
the best optimised and fast loading way to do this. my site is in
ASP.Net and VB.net and SQL 2005

Regards
T.K.

Brett Allen

unread,
Aug 16, 2009, 3:20:05 AM8/16/09
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
If you are talking about field names like "Username" and "Login" and
"Password

static text

Then use a string resource library. Like MyLibrary.EN.dll and
MyLibrary.DE.dll

If you're talking dynamic text that users create and can opt to put in
different languages, that will have to be handled by SQL obviously.

Processor Devil

unread,
Aug 15, 2009, 11:41:58 AM8/15/09
to DotNetDe...@googlegroups.com
well, what about Dictionary class (System.Collections.Generic)? It would be like:

Dictonary<string, string> nameField = new Dictionary<string, string>(3);
nameField.Add("en", "Your Name");
nameField.Add("de", "Deine Name");
etc

Then you would have session variable called language (with values en, de or fr)
and you would call it as nameField[(string)this.Session["language"]]

2009/8/15 T.K. <tarek....@gmail.com>

bala murugan

unread,
Aug 15, 2009, 10:49:18 PM8/15/09
to DotNetDe...@googlegroups.com
Hi
         For your requirement. create an ASP.Net page and then have your resource  file for various languages. that is very good best practice.

If you want I can give you a sample application. Let me know.

Thanks,
Bala.
Mob:-9003158203
Web:- htttp://balaweblog.wordpress.com


On Sun, Aug 16, 2009 at 8:17 AM, bala murugan <balamurugan...@gmail.com> wrote:
Hi,

Cerebrus

unread,
Aug 16, 2009, 5:08:52 AM8/16/09
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Neither technique is any good. Use ASP.NET's extremely flexible
globalization features and let the framework handle the complexities.

Brett Allen

unread,
Aug 16, 2009, 12:09:05 PM8/16/09
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Here is the MSDN article for using resources for ASP.NET, if that is
somehow different than windows applications as Cerebrus suggests, then
I'd be surprised.

However I am primarily a .NET windows application developer, not
ASP.NET.
> > T.K.- Hide quoted text -
>
> - Show quoted text -

Cerebrus

unread,
Aug 17, 2009, 1:15:42 AM8/17/09
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Brett,

I have not suggested that at all. I replied to the OP.

However, the Globalization process does have significant differences
when applied to Windows forms as opposed to Web forms. In this case,
the OP is asking w.r.t ASP.NET.
> > - Show quoted text -- Hide quoted text -

Brett Allen

unread,
Aug 17, 2009, 5:43:53 PM8/17/09
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Seems I forgot the link.

Here you can find more information: http://msdn.microsoft.com/en-us/library/c6zyy3s9.aspx
Reply all
Reply to author
Forward
0 new messages