Last post Jan 07, 2014 07:06 AM by Ricksen
Oct 30, 2013 09:44 AM|Radecho007|LINK
We have a website about 80 pages, and will be translating x4 languages. Are resoruce files used for page content? If so what is the best way to label the string values inside resource files. Page1-p1 (paragraph 1), Page1-p2 (paragraph 2).. etc? Or is it
better to skip resource files in this case and create seperate pages for each langauge?
Oct 30, 2013 10:00 AM|er_abhi|LINK
Or you could store your language text in database and make it database driven, just an option.
Dec 05, 2013 04:34 AM|Tamizhiniyan Natarajan|LINK
I too think this way. But my question is,
Dec 05, 2013 05:00 AM|er_abhi|LINK
Here are my suggestions -
Suppose in your application if u have 2 webpages , page1 and page2 . Then in database you have to maintain all the control ids for each page, for eg. if page1 has controls with id txt1,lbl1 then insert these IDs in your database table along with its related
page1. Create a C# class which finds all the controls on page which is getting loaded and in this class you can find the IDs and match with your database id and assign related text etc. For eg. when page1 is getting loaded , then make a c# function in which
u pass pagename and get all its related controls,text and then on page itself find the IDS using findcontrol of content page and then match related ids and assign whatever u want to assign..
Hope it helps
Dec 05, 2013 05:08 AM|Tamizhiniyan Natarajan|LINK
Thanks... i got an idea from ur suggestions. Can u suggest this problem posted in this
Dec 05, 2013 05:31 AM|er_abhi|LINK
Ok. let me look into it.. Also, please mark as answer if the post helped u.
Jan 07, 2014 07:06 AM|Ricksen|LINK
assuming you use the MVC Framework, I'd prefer using a custom ViewEngine (either WebForm or Razor, both possible) regarding my own currently localized sites.
As some of the localizations use different teaser images or texts blow up the layout in some special cases, you can easily create adaptive views for any matter. Simply copy a view and attach the language info to the filename. The modified view engine tries
to lookup the right view by currently selected locale and falls back to the default view if none is found.
Because you mentioned .resx for contents I'd recommend this to maximize the flexibility of static contents and just use .resx for buttons, labels and error messages.Nonetheless, it's quite difficult to manage the contents in the resource editor! ;)