Supercharge Your Innovation With Domain-Expert AI Agents!

Node.js-based internationalization realization method

An implementation method and technology of business data, applied in the direction of network data browsing optimization, special data processing applications, instruments, etc., can solve the problems of complex and cumbersome query, inconvenient maintenance, etc., to achieve convenient use, improve user experience, and reasonable design. Effect

Active Publication Date: 2017-04-19
INSPUR COMMON SOFTWARE
View PDF5 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In traditional software systems, the way to deal with internationalization is to use resource files to process interface characters. For business data stored in the database, the mode of database resource table is used to store different language forms of business data that need to be internationalized. In the resource table, associated queries during web requests will put a lot of pressure on the database, making queries complicated and cumbersome, and not easy to maintain

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Node.js-based internationalization realization method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0031] js-based internationalization implementation method of the present invention, the implementation method is to confirm the system language according to the language setting of the system user, then adopt the mode of static resource file for page characters and operation prompt information to realize internationalization, and adopt the database for business data The resource file is cached by adding the index to the resource file, and then the internationalized content is obtained according to the database index to realize the internationalization of the business data.

[0032] as attached figure 1 As shown, the specific steps of the implementation method are as follows:

[0033] (1) In the system development stage, extract internationalized resource files of different language versions, including system client page characters, operation prompt information and elements of different language texts of system server business data; internationalized resource files include sta...

Embodiment 2

[0047] The internationalization implementation method based on Node.js of the present invention includes page characters, operation prompt information and business data, the internationalization of page characters and operation prompt information is realized by the method of static resource files, and the internationalization of business data adopts resource files The method of adding database index is realized. The specific implementation steps are as follows:

[0048](1) Define resource files, characters on privilege escalation pages, operation prompt information, and business data content, and provide versions in different languages;

[0049] Resource files use javascrpit, json and other forms to output objects in the form of json;

[0050] The following is an example of a Chinese resource file:

[0051] exports.i18n = {

[0052] "login": "login"

[0053]}

[0054] Resource files in English:

[0055] exports.i18n = {

[0056] "login": "login"

[0057]};

[0058] (2) ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a Node.js-based internationalization realization method and belongs to the field of software internationalization. The objective of the invention is to solve technical problems of how to meet language requirements in different regions, and extract required language and related culture elements from a system to form resource files which are processed and then return back to contest meeting requirements of system users. The realization method comprises steps of confirming a system language according to language setting of a system user; then, adopting a static resource file mode for page characters and operation prompt information, thereby achieving internationalization; and adopting a mode including a database index and the resource file for service data so as to buffer the resource file; and acquiring internationalization contents according to the database index, thereby achieving internationalization of the service data.

Description

technical field [0001] The invention relates to the field of software internationalization, in particular to a method for implementing internationalization based on Node.js. Background technique [0002] Node.js is a Javascript runtime. In fact, it encapsulates the Google V8 engine. The V8 engine executes Javascript very fast and has very good performance. Node.js is optimized for some special use cases and provides an alternative API that makes V8 run better in a non-browser environment. [0003] Node.js is a platform based on the Chrome JavaScript runtime, which is used to easily build fast-response and easy-to-extend network applications. Node.js uses an event-driven, non-blocking I / O model to be lightweight and efficient, and is very suitable for running data-intensive real-time applications on distributed devices. [0004] When developing software, it must be able to respond to visits from different regions and countries in the world at the same time, and provide co...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/44G06F17/30
CPCG06F9/454G06F16/172G06F16/2228G06F16/245G06F16/957
Inventor 刘强
Owner INSPUR COMMON SOFTWARE
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More