Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-05-08 : 09:47:37
|
| berggreen writes "Hi there, I am developing Content Management Systems / e-Learning Management Systems - and for these I need a smart/logical way of joining the LANGUAGE into the system.(I know... everybody got their own systems... and I am one of them too... but my customers WANTS me to do my own.. as they trust me... :-) )I've already divided everything else into small tables, except the "text". So I have layout, structures of the pages etc. in a nice normalised way, I just can decide/figure out which approach is the right one for my "language support".Should I do it with a stored procedure and then use parametres as ID for the text item and one for Language?or is there a smartere approach?Perhaps I should metion that I am also going to implement revisions/backups later, but that should not be a problem with the right normalization...So my basic ideas is to have a [LANGuage] table:[LANG_id], [LANG_sPostfix], [LANG_sCountryName]and then a [ContentTEXt](table):[CTEX_id] // for each item[LANG_id] (foreign key to LANGuage table...)[CTEX_sContent] // forBut I am not sure if this is the best approach... and therefore I humbly asks you ... ohh Guru of the almight SQL...Do you have a better approach... or should I stick with this one...Regards, in hope of an answer from you,Carsten BerggreenSystemdeveloperDenmark" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-05-08 : 10:47:18
|
| I don't see any problems with that design. It's hard to tell though without knowing how the rest of the database is set up though. When you talk about language support and text, what exactly do you mean? Are you storing different versions of the pages for each language?The only issue I can forsee is not related to your table designs, but with collation. If you are using SQL Server 2000, then you can specify a collation for sort order, accented character sensitivity, etc. on a table-by-table or column-by-column basis, but you can only have one active collation on the table/column at a time, and you'd have to ALTER the table in order to change it. You may have to choose a generic collation that sorts some languages correctly but not others.Books Online has more information on collation, you might want to read up on it a little more. It may not be a problem for you, but you should research it to be sure. |
 |
|
|
berggreen
Starting Member
1 Post |
Posted - 2002-05-08 : 11:23:28
|
| Yes I am storing a language version of each page, but within the same layout. I have a large specially design template system of my own, and within these I will JOIN the [ContentTEXt] table into the [PAGE] by assigning a [LANG_id] as a key. This way the [LANG_id] could be stored in a cookie or a session variable pr. user, and each user still sees the same page, just in the prefered language...Quite simple and logically to me, I am just wondering if there are any "unseen" problems, that I didn't take into account with this approach... ?Eg. what happends if an element is missing for a certain language? how should I handle that?Secondly I posted this question, to see if anybody ELSE has ANOTHER approach, which they have used before - to learn what to do and NOT to do?Anyone? got any previous experiences with this problem? |
 |
|
|
|
|
|
|
|