Last post Jan 17, 2006 12:17 PM by rmprimo
Jan 16, 2006 03:29 PM|Peter Smith|LINK
Im trying to localize my website.
In my database I have a table: tblSports
SportName nchar(30) (this is the English sport name)
Now in one page on my site I have a checkboxlist. I want to localize the names of the sport.
The value of the items in the checckboxlist I think I want to make equal to the PK value in tblSport.
Jan 16, 2006 08:35 PM|rmprimo|LINK
You are using global expressions but your data is under a local resource file. For global you have to create a resx manually. For local the invariant should be created automatically by the GLR.
Also, your choice of keys is fine. Your architecture probably is not. You might want to separate the DAL into an abject and bind that to your list control.
Jan 17, 2006 06:27 AM|Peter Smith|LINK
Jan 17, 2006 12:17 PM|rmprimo|LINK
First of all did you get it fixed by creatinfg a global resx and using that for the expressions?
There are two issues here. One is related to localization and one to data access.
"invariant" means default: "Example.aspx.resx": the no language language and the no place locale. Theoretically its data should never be used.
It does serve as the ultimate fallback when a user from a country you do not support and a language you do not support requests your page. However if your site is intended for US audience you should really provide
Example.aspx.en-US.resx Also if an occasional Brit or Aussie hits you - Example.aspx.en.resx even if those are identical copies.
That way you do not make the system do "assembly probing" which is very costly to perf.
You should bone up onthe difference b/n Local and Global resources.
The utility that abstracts the data from the page to the LOCAL resx is called "Generate Local Resources"(GLR) That is what I was referring to. It is located under the Tools menu. It generates the local expressions/meta tags
What I meant was that even though you could you should not do the Local invariant yourself but let the GLR do it.
Global resx are different. You do the invariant manually yourself.
Now DAL is an architecture issue not where the data is stored, but how many layers/tiers before it finally shows up on the page. That is debated to death in the blogs etc.
Test question, how did I know you did not have ANY global resx?