Multilingual Web Page Loading with Tree-Structured Translation Files

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for implementing web pages that support multiple languages are inefficient, requiring significant workload and storage capacity, with redundancy in translation files and slow response times due to hardcoded language support and repeated language strings across multiple files.

Innovation Solution

A tree-shaped translation file system where identical language strings are combined into a minimum common ancestor file and deleted from original files, reducing labor costs and storage needs, and using a callback queue to improve response speed by executing only necessary callback functions when switching languages.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If language strings are stored separately in each translation file for every language, then language switching can be implemented, but storage capacity is wasted and redundancy increases

Engineering Contradiction:
Improvelanguage switching capabilityVSAvoidstorage capacity
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The patent merges identical language strings across multiple translation files into a single shared storage location. Instead of storing the same string in each language's translation file separately, the system consolidates duplicate strings into a common pool that can be referenced by multiple languages, thereby reducing overall storage requirements while maintaining the ability to switch between languages.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent creates a universal language string storage mechanism that serves multiple translation files simultaneously. A single language string storage location can be shared and referenced by multiple languages, making the storage system multi-functional. This allows the same storage resource to support multiple languages without requiring separate dedicated storage for each language.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Reliability

If translation files are processed completely when loading web pages, then all language strings are available, but processing time increases

Engineering Contradiction:
Improvelanguage string availabilityVSAvoidpage loading time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent performs preliminary processing of translation files during page loading by identifying and extracting only the language strings that are actually needed for the current page, rather than processing the entire translation file. This preliminary action prepares the necessary data in advance while avoiding unnecessary processing of irrelevant content.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts only the specific language strings that are required for the current web page from the translation files, separating them from the rest of the translation data. This extraction process retrieves only the relevant portion of the translation files, reducing processing time while ensuring all necessary language strings are available.

Inventive Principle:
Principle #2Taking out (Extraction)

3Adaptability or versatility

If language strings are hard-coded in web scripting code, then language support is implemented, but source code modification is required when adding languages

Engineering Contradiction:
Improvelanguage supportVSAvoidsource code modification
Core Design Contradiction:
Adaptability or versatilityVSEase of manufacture

Solution Approach 1:

The patent extracts language support functionality from the hard-coded web scripting code and relocates it to external translation files. By taking out the language string definitions from the source code and placing them in separate translation files, the system maintains language support capability while eliminating the need to modify source code when adding or modifying languages.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces translation files as an intermediary layer between the web scripting code and the actual language strings. Instead of the code directly containing language strings, it references them through the translation files, which act as a mediator. This allows language changes to be made in the translation files without touching the source code.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10417348B2Method for processing and loading web pages supporting multiple languages and system thereof
Publication Date: 2019.09.17 HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
  • US10417348B2 patent drawing
  • US10417348B2 patent drawing
  • US10417348B2 patent drawing

AI summary

The present invention relates to the application field of computer networks, and disclosed are a method for processing and loading a web page supporting multiple languages and a system thereof, so as to reduce time and cost of labor investment when some language is added or modified, save storage capacity of a web page server, increase the speed of page loading and translation rendering, and reduce the redundancy of a translation file set. The present invention is based on a tree-shaped translation file set, where each hypertext markup language (HTML) has a corresponding translation file. The method includes the following steps: scanning all translation files in a translation file set; extracting a same language string in different translation files or in different node sets of a same translation file, and inserting the same language string into a minimum common ancestor translation file of the different translation files or a common node set of the same translation file; deleting the same language string from the original translation files or node sets.