1: Multiple Languages of data:
In Qblog, the data in multiple languages, I was divided into two schemes to deal with:
A: Multiple data, article data, a language field to identify the language of the data.
B: For other data, headings, announcements, etc., use a [#LangSplit] logo to separate the two languages.
But now the plan is a little different, look at the following figure:
See a lot of XML fields, this is the last project to inherit the essence, in the project can not move the fact exists.
About table name and field naming way, go is international fan, everybody don't learn.
For XML, a small set of processing options is required:
The database is archived in XML fields in multiple languages in the format:
<ml v= "1.0" >
<m l= "ZH-CN" > Chinese </M>
<m l= "en" >english</m >
<m l= "..." > Other Languages </M>
</ML>
Then for this archive, you need to have the appropriate processing:
SQL: Query syntax is:
Value: Field name. Value (' (/ml/m[@l= "ZH-CN"]) [1] ', ' nvarchar (max) ')
Fetch node: field name. query ('/ml/m[@l= ' en '] ')
Judgment: Field name. exists ('/ml/m[@l= "ZH-CN"])
Sort: Sort by the name of the field after the value is taken
The processing process is generally as follows: