I would like to request opinions in order to approach internationalization of a website in C#.
I´m working with resx files to def开发者_JS百科ine 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.
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).
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.
精彩评论