views:

48

answers:

2

Hi,

I would like to request opinions in order to approach internationalization of a website in C#.

I´m working with resx files to define strings of text. I would like to know if its possible to use resx to define categories - eg: commerce website - or its preferred to use a table in the database with a foreign key to table category?.

brgds.

+1  A: 

I thing that for a website it would be nicer to use a table in your database. Otherwise if you should write a desktop application. I would prefer a resx file.

So that you can load that file on the start of your program. So you don't need to go to a database. For a website you already need a connection to get some other data to fill the page.

SvenVdb
If you're going to use the database, it makes sense to load it all up at the start.
Steven Sudit
Thank you!. I have a doubt regarding get locale using database. With resx I set up in web.config a <add name="CookieLocalizationModule" in httpmodule>, but in database which approach is the best to follow?.
sebastian_h
+1  A: 

As a general rule, use resx files to localize strings that can only be added by developers and are only updated when new versions of the application are deployed. Resx files are specially tailored for this purpose and work great.

If you want to give the end user the ability to add their own values you will have to do the localization in the database (or use some other mechanism).

PhilB