Universal multi-language rendering method for internationalized users

By automatically obtaining the user device language and processing it in the background system, the inefficiency and error problems of multilingual support in the Internet of Vehicles system are solved, convenient multilingual rendering and data consistency are achieved, and user experience and system stability are improved.

CN120278170AInactive Publication Date: 2025-07-08YUKUAI CHUANGLING INTELLIGENT TECH (NANJING) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510411249.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-07-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When the existing Internet of Vehicles system faces multilingual support in different regions, countries and cultural backgrounds, the user's manual language selection is inefficient, which can easily cause errors or confusion, affecting the user experience and data accuracy.

Method used

By automatically obtaining the system language of the user device, uniformly processing the language information in the request header, and translating and replacing text content in the background system, it provides a multi-language rendering method for international users, including obtaining the user device language, setting the request header, facet processing and text content extraction, translation and returning to the correct language version.

Benefits of technology

It simplifies user operation processes, provides convenient and personalized user experience, ensures consistency in data processing, avoids errors caused by language differences, and reduces system complexity and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120278170A_ABST
    Figure CN120278170A_ABST
Patent Text Reader

Abstract

The invention provides a universal multi-language rendering method for internationalized users. The universal multi-language rendering method comprises the following steps that S1, a user initiates a request; s2, acquiring a system language of current equipment of a user, and putting the system language into a request header; s3, extracting a system language of current equipment of the user in the request header; s4, section processing and text content extraction; s5, returning a translated result to the client; according to the method provided by the invention, the time zone or language information of the user is automatically obtained and correspondingly processed, so that the user does not need to manually select a language, the operation process is greatly simplified, and more convenient and personalized user experience is provided; through a unified background language conversion mechanism, the processing and storage consistency of data in the system is ensured, and errors or confusion caused by language differences is avoided, so that the accuracy and the reliability of the data are improved, the work of processing different logics for each language by developers is reduced, and the complexity and the maintenance cost of the system are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a universal method for multi-language rendering for international users. Background Art

[0002] With the rapid development of intelligent driving and automation technology, the Internet of Vehicles, as an important part of the modern transportation system, has been widely used around the world. The core goal of the Internet of Vehicles is to achieve intelligent transportation, road safety, remote diagnosis and other functions through real-time interaction between vehicles and external devices (such as traffic lights, road test units, other vehicles and cloud services). The development of this technology has promoted the improvement of intelligent driving and promoted the transformation of the global automotive industry. The global application of Internet of Vehicles systems is facing various technical challenges, one of which is how to meet the needs of different regions, countries and cultural backgrounds. Due to the significant differences in driving behavior, traffic rules, language habits, cultural differences and other aspects between different regions, the internationalization (i18n) and localization (l10n) design of Internet of Vehicles systems has become particularly important. The internationalization and multilingual support of Internet of Vehicles services are not just a matter of language translation, but also involve cross-cultural adaptation, user experience optimization and compliance with local laws and safety standards. In the existing Internet of Vehicles system, users are in different language environments, resulting in the need for users to manually select the language for translation when multilingual data is displayed on the front end and processed on the back end, which is inefficient. At the same time, it is easy to cause errors or confusion due to language differences, affecting user experience and data accuracy. Summary of the invention

[0003] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a general method for multi-language rendering for international users.

[0004] To achieve the above object, the present invention adopts the following technical solutions: A general method for multi-language rendering for international users includes the following steps: S1: User initiates a request; The user initiates a request from the client, and the request includes a request path, a request header, a request body, etc.; The request path identifies the resource that the client wants to access; The request header includes an Accept-Language field, and the Accept-Language field is used to indicate the language that the backend system user wishes to respond to; The request body contains the actual data of the request; S2: Get the system language of the user's current device and put it into the request header; The client obtains the system language of the user's current device from the operating system of the user's current device through the program interface API or device settings; Set the obtained system language of the user's current device as the Accept-Language field in the request header, and the client sends the updated request header to the background system.

[0005] S3: Extract the system language of the user's current device in the request header; When the request reaches the background system, the background system receives the request, uniformly intercepts the request through the deserialization layer, parses the Accept-Language field of the request header, and extracts the language information from it, that is, the system language of the current device; The background system executes the request and returns the response content; Furthermore, if the Accept-Language field is empty or valid language information cannot be extracted, the background system uses the default language through the fallback mechanism; the default language is a commonly used language set in advance by the background system; By setting the default language, it is ensured that the background system can still respond normally when valid language information cannot be extracted; Preferably, if the request contains a language parameter manually specified by the user, the language corresponding to this language parameter is preferentially used as the system language of the current device. If no language parameter is specified in the request, the system language of the current device extracted from the request header is used.

[0006] S4: Aspect processing and text content extraction; The aspect logic layer intercepts all response content, filters out all fields with text display from the response content, and determines whether the fields contain text that needs to be language-converted through methods such as regular expression or string matching check; If it contains text content that needs to be language-converted, extract the text content; the background system retrieves in the target language database according to the system language of the current device, and obtains the translation text corresponding to the conversion of the text content into the system language of the current device; The target language data contains translation texts in different language comparisons.

[0007] S5: Return the translated result to the client; After the translation operation is completed, replace the original text content corresponding to the response data with the translation text obtained from the database; Return the assembled data to the client to ensure that the client can display the correct language version.

[0008] Compared with the prior art, the beneficial effects of the present invention are: The method provided by the present invention automatically obtains the user's language information and performs corresponding processing, and the user does not need to manually select the language, which greatly simplifies the operation process and provides a more convenient and personalized user experience; through a unified language conversion mechanism in the background, the consistency of processing and storage of data within the system is ensured, and errors or confusion caused by language differences are avoided, thereby improving the accuracy and reliability of the data; Through a unified language processing mechanism, developers are less likely to handle different logic for each language, which reduces the complexity and maintenance costs of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 The present invention is a flowchart of the steps of a general method for multi-language rendering for international users. DETAILED DESCRIPTION

[0010] In order to provide a further understanding of the purpose, structure, features, and functions of the present invention, the following detailed description is given in conjunction with the embodiments.

[0011] like Figure 1 As shown, a general method for multi-language rendering for international users includes the following steps: S1: User initiates a request; The user initiates a request from the client, and the request includes a request path, a request header, a request body, etc.; The request path identifies the resource that the client wants to access; The request header includes an Accept-Language field, and the Accept-Language field is used to indicate the language that the backend system user wishes to respond to; The request body contains the actual data of the request; S2: Get the system language of the user's current device and put it into the request header; The client obtains the system language of the user's current device from the operating system of the user's current device through a program interface API or device settings; For example, in a web application, JavaScript's navigator.language can be used to obtain the browser's language setting; On Android, the client can get the device language through Locale.getDefault().getLanguage().

[0012] The system language of the user's current device is set to the Accept-Language field in the request header, and the client sends the updated request header to the backend system.

[0013] S3: Extract the system language of the user's current device from the request header; When the request reaches the back-end system, the back-end system receives the request and uniformly intercepts the request through the deserialization layer, parses the Accept-Language field in the request header, and extracts the language information therefrom, i.e., the system language of the current device; The back-end system executes the request and returns the response content; Further, if the Accept-Language field is empty or no valid language information can be extracted, the back-end system uses the default language through a fallback mechanism; the default language is a commonly used language pre-set by the back-end system; By setting the default language, it is ensured that the back-end system can still respond normally when no valid language information can be extracted; Preferably, if the request contains a language parameter manually specified by the user, the language corresponding to this language parameter is preferentially used as the system language of the current device. If no language parameter is specified in the request, the system language of the current device extracted from the request header is used.

[0014] S4: Aspect processing and text content extraction; The aspect logic layer intercepts all response content, filters out all fields with text display from the response content, and determines whether the text to be language-converted is included in the field by means of regular expression or string matching check, etc.; If the text content to be language-converted is included, the text content is extracted; the back-end system retrieves in the target language database according to the system language of the current device, and obtains the translated text corresponding to the conversion of the text content into the system language of the current device; The target language data contains translated texts in different language contrasts.

[0015] S5: Return the translated result to the client; After the translation operation is completed, the translated text obtained from the database is used to replace the corresponding original text content in the response data; The assembled data is returned to the client to ensure that the client can display the correct language version.

[0016] This method has good internationalization support, can adapt to the needs of users in different languages and time zones, supports application scenarios worldwide, helps enterprises expand overseas markets and provide customized services for users in different regions; can effectively handle requests from users in different regions and ensure data consistency in different language and time zone environments, improving the stability and scalability of the system; through automatic adaptation of user language settings, the system can more flexibly respond to the needs of users in different regions, has strong cross-regional and cross-cultural adaptation capabilities, and helps to improve the satisfaction and loyalty of global users.

[0017] The present invention has been described by the above related embodiments. However, the above embodiments are only examples for implementing the present invention. It must be pointed out that the disclosed embodiments do not limit the scope of the present invention. On the contrary, changes and modifications made without departing from the spirit and scope of the present invention fall within the scope of patent protection of the present invention.

Claims

1. A general method for multi-language rendering for international users, characterized in that: The following steps are involved: S1: User initiates a request; The user initiates a request from the client, and the request includes a request path, a request header, and a request body; S2: Get the system language of the user's current device and put it into the request header; The client obtains the system language of the user's current device from the operating system of the user's current device through the program interface API or device settings, and saves it in the request header; S3: Extract the system language of the user's current device from the request header; When the request reaches the backend system, the backend system receives the request and intercepts the request uniformly through the deserialization layer to extract the language information, that is, the system language of the current device; The backend system executes the request and returns the response content; S4: Aspect processing and text content extraction; The aspect logic layer intercepts all response contents, filters out all fields with text display from the response contents, extracts the text that needs to be translated, and translates it; S5: Return the translated result to the client; After the translation is completed, the translated text will replace the corresponding original text content in the response data, and the assembled data will be returned to the client.

2. The universal method for multi-language rendering for international users as claimed in claim 1, characterized in that: The request header includes an Accept-Language field, and the Accept-Language field is used to indicate the language that the backend system user wishes to respond to; In step S2, the system language of the user's current device is set as the Accept-Language field in the request header, and the client sends the updated request header to the backend system.

3. The universal method for multi-language rendering for international users as claimed in claim 1, characterized in that: In step S3, the request is uniformly intercepted through the deserialization layer, the Accept-Language field of the request header is parsed and the language information, that is, the system language of the current device, is extracted therefrom; if the Accept-Language field is empty or valid language information cannot be extracted, the background system uses the default language through the fallback mechanism; the default language is a common language set in advance by the background system.

4. The universal method for multi-language rendering for international users as claimed in claim 1, characterized in that: In step S3, if the request contains a language parameter manually specified by the user, the language corresponding to the language parameter is preferentially used as the system language of the current device; if the request does not specify a language parameter, the system language of the current device extracted from the request header is used.

5. The universal method for multi-language rendering for international users as claimed in claim 1, characterized in that: The specific contents of step S4 are as follows: The aspect logic layer intercepts all response contents and filters out all fields with text display from the response contents. It determines whether the fields contain text that needs to be converted to a language by checking regular expressions or string matching. If there is text content that needs to be language-converted, extract the text content; the background system retrieves in the target language database according to the system language of the current device to obtain the translated text corresponding to the conversion of the text content into the system language of the current device; The target language data contains translated texts with different language contrasts.

Citation Information

Patent Citations

  • Multi-language switching method, component, medium and equipment under front-end and back-end separation architecture

    CN114168246A

  • Information display method and server

    CN118626191A

  • Data processing method and device, computer equipment and storage medium

    CN119537073A