How to implement Dojo internationalization design

Source: Internet
Author: User
Tags i18n resource

Introduction to Dojo Internationalization

i18n Introduction

People often refer to i18n as the abbreviation of "internationalization", whose source is the first end character I and N of the English word internationalization. 18 is the number of characters in the middle.

With the integration of the global economy, software developers should develop WEB applications that support multiple languages and internationalization. For WEB applications, the same page needs to display different effects in different language environments. That is, a WEB application can display different user interfaces at run time based on the country and language from which the client request originated. This eliminates the need to modify the application's code when it is necessary to add support for a new language in your application.

A brief introduction to Dojo i18n

Dojo internationalization is the internationalization of the client, in contrast to the traditional implementation of the internationalization logic on the server side, the internationalization of the client can reduce the burden on the server side, so that the server can focus more on processing business. The local resource files used by Dojo internationalization are JSON files that are described in JavaScript.

Design Overview: Introduction and analysis of application instances and architectures

Business Scenario:

Due to business expansion needs, businesses now need to create a global multi-language support Web site, so that in different countries or regions, when users browse the Web site, the website can automatically choose the appropriate language to display to the user. For example, a Web site provides a user registration page, when the user in English to see the registration page is the English interface, and when the use of Chinese users to see the registration page is in Chinese, if required to fill out the field, or the wrong information, can be used in accordance with the language of the user to give corresponding prompts. Of course, the registration page is just a part of the site, other Web pages can also achieve internationalization support, the principle is the same.

Front frame design: Dojo 1.7.1, HTML, JSP, JavaScript

Presentation layer: Introducing and analyzing the design of the presentation layer of the application

Now assume that the site supports two languages: English and Chinese, of course, users can add to their own needs for other language support, the principle is the same, just add the corresponding bundle resource file. First, use a registration page as an example to demonstrate for everyone.

When you open the registration page in an English browser, the interface is as follows:

Figure 1. English Registration page Example diagram

When you open this page in a Chinese browser, the page field is converted to Chinese and the interface is as follows:

Figure 2. Chinese Registration Example Chart

More Wonderful content: http://www.bianceng.cn/webkf/Dojo/

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.