astajl
-
12/30/2005 9:23:50 AM
Problems about Multilanguage
<b>If we want to store data of books and we implement 2 language, let say English and Chinese, CMS use 2 rows to store in table. However, I want to store them all in 1 row. I thought a approach to implement, but there are some problem.</b> <hr> When I created the document template "Book", I created enough fields for both lang version (e.g. EnglishBookName and ChineseBookName). I built the pages (menu) for under these 2 lang culture. Content Editor only need to create document type as "Book" under a language, let say English, but he had to fill all fields (BOTH EnglishBookName and ChineseBookName).
I created 2 transformations, "englishview" and "chineseview". englishview: <%# DataBinder.Eval(Container, "DataItem.EnglishBookName") %> chineseview: <%# DataBinder.Eval(Container, "DataItem.ChineseBookName") %>
I used Sessions to store the current culture, and use cmsdatalist the retrieve the data in the aspx file. <% If sessionCulture = "en-us" Then %> <cc1:cmsdatalist id="Book_EnglisgView" SelectNodesClassName="cms.Book" TransformationName="cms.Book.englishview" ... runat="server"></cc1:cmsdatalist> <% ElseIf sessionCulture = "zh-tw" Then %> <cc1:cmsdatalist id="Book_ChineseView" SelectNodesClassName="cms.Book" TransformationName="cms.Book.chineseview"... runat="server"></cc1:cmsdatalist> <% End If %> <hr> <b>Problem: ONLY english version work, because I did not create chinese version of that document. I believe my approach is wrong. I just want to know if there is any other solution can solve the problem(store 2 language in 1 row).</b>
|