An overview of multilingual solutions for ASP.net mvc

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.