Link to home
Start Free TrialLog in
Avatar of jinn_hnnl
jinn_hnnlFlag for Netherlands

asked on

Multiple Language issue (English, Dutch, German, French) C#

Hi expt,

I am dealing with multiple languages issue within pages (English, Dutch, German, French). Each page's controls  will have to be loaded upon the selected language. there can be Spainish and Vietnamese in addition (so ...pretty much)

There are several option which are:
- using Database (kinda slow, and have to use cache) but more maintainable
- using XML (the best so far)
- using ASP.NET build-in Localization and globalization (I don't  really like this)

Can you give me an idea, which way is the best, and give me a small hint how should I implement this (example or link), just brief is enough and appreciated.

It doesn't  have to be one of these 3 methods. And, I am using ASP.NET 2.0 C#

Thanks in advance,

JINN
Avatar of DreamMaster
DreamMaster

Best is very relative in my opinion.

At the company I work at we have our own Content Management System, which we made ready for multiple languages by using a class Language, this class contains everything for every language we want to add. Depending on the chosen language, we change the languageID. Things like variable names, fieldnames etc...We could combine this with Globalisation and Localisation, but chose not to. We made this choice because a lot of things can not just be defined by country. For example if the price for a product is in euros, you could replace the notation to that of pounds sterling, but it would be the wrong price.

Now obviously you could reach the same effect using XML, it's more or less a matter of personal preference.

Regards,
Max.
Avatar of jinn_hnnl

ASKER

Hi Max,

Thanks for the suggestion. I have been busy implementing some other stuff and then it was Easter ... Now I have to come back to this...

Your idea about storing language information in Code behind seems interesting. But isn't it hard for maintainance (they will have to access the source code in order to change ...). But I think for button or lable Text ... I would follow your suggestion.

What I am wondering is: how you store it, and track it through languageID ???... in ArrayList or ... Can you give me a little more example ?
You could even combine the use of codebehind with a database.

How about creating a database table which has all your lables in different languages. Get the correct labels etc using a simple query based on your languageID...That way they can alter any available language specific thing in the database. You could even write them a little admin for that.

Hope that helps,

Regards,
Max.
I was also thinking about using Database (but it kinda slow everytime a page or control is loaded - I might have to use cache).

I am looking forward if somebody can give me an idea how to implement it using XML, and codeBehind (like Max said)

@Max: can you give me small example of how you gonna store those values in CodeBehind (I have tried to use some static class and field, but it seems not very smart).

Thanks
ASKER CERTIFIED SOLUTION
Avatar of DreamMaster
DreamMaster

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
MOI, Aardig Nice, dank voor de wenken ^^

I work with C#, but I understand your idea, coooooool. I will try it out and comeback to ya later. I will partly implement my pages from codebehind like this, and the other from XML. Still wait for someone who can help me out with XML issue (I might have to end up with another question properly LOL)

I will give credit after a while (wanna see addtional solution).

Thanks alot  MAX

JINN ^^

PS: r u Dutch ???
LOLLL

I read your profile and I see you work in the same city as I do ^^. Cool ...
No way? You work in Den Bosch as well? That IS cool!

Yes I am Dutch, what gave me away? :P The names of the variables were soooo international.. ;) Must have been my terrible typing accent then ;)

Regards,
Max.
ohh ^^ your don't really have problem with accent but there are alot of Dutch words. and I have been living in Eindhoven for awhile so ....

's Hertogenbosh is such a beautiful city, but I hate the bus station >.< OMG... the bus system is so weird :D.

JINN ^^
I like 's-Hertogenbosch a lot better than Eindhoven personally, not that I have anything against Eindhoven ;)

I hope that you will get other input for your question, but seeing that it has already been open a while now it will probably be out of sight for others now.

What was the issue with the XML by the way, maybe I can help you with that as well.. ;)

Regards,
Max.
Are you still here jinn? If I can help with your XML question, please tell me..but I doubt anyone new will come in this question anytime soon.
Glad to have been helpful Jinn :)
Thank I have implemeted successfully using CodeBehind as the idea you gave me. It's for button lable .... and standard controls like that.

The XML issue is what I wanna deal with some text (or bigger content than text on a button etc...). And I wanna store that not in a database but an XML file.

I wanna know what the best way to store (smart) and how should I load these values in such a good structure (I used 3 tier layers application architecture)... so those loading stuff will happen in DataLayer and Business Logic Layer... But anyway, I just wanna know how should I make those XML files (should I store all in one XML) or each page each XML file... blah blah... (I really don't know how to express this idea, hope you understand it ^^)

JINN ^^

PS: I wanna accept multiple solution, (make the other assisted for example) but I hit the ACCEPT SOLUTION button... I think I can not assign credit for a new solution, can't I ????  Should I publish another question then ??