Global API for Distributed Software Package Translation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In distributed software development, version mismatch issues arise between source code and translation data, leading to inconsistent translations of text strings across modules, especially when some packages are not under the developer's control after publication.
Innovation Solution
A global API is used to extract text strings from source code, calculate resource message keys, and translate them, storing both in source and additional language resource files, allowing for consistent translation and distribution of modular packages without affecting the distributed development environment's flexibility.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If translation data is maintained in a central repository in distributed software development, then translation consistency can be achieved, but version mismatch issues arise between source code and translation data
Solution Approach 1:
The patent introduces resource message keys as intermediary elements that bridge source code and translation data. These keys serve as stable identifiers that remain consistent across version changes, allowing the system to match translations to the correct source strings even when code evolves. The keys act as a mediator layer that decouples the versioning of source code from versioning of translation data.
Solution Approach 2:
The patent implements preliminary extraction of text strings and generation of resource message keys during the build process, before distribution. This preliminary action creates a mapping structure that persists across versions, enabling the runtime system to resolve translations without requiring synchronized version updates of source code and translation files.
2Adaptability or versatility
If packages are distributed independently in modular development, then development flexibility is maintained, but translation control is lost for packages not under developer control after publication
Solution Approach 1:
The patent creates a universal resource file format and message key structure that works across all packages regardless of their origin or control status. This universal structure allows the same translation mechanism to be applied consistently to internally developed packages, open source packages, and third-party packages, maintaining translation control across the entire distributed system while preserving package independence.
Solution Approach 2:
The resource message keys serve as a mediator that enables translation control without requiring control over the package itself. By embedding these keys in the distributed package and having the runtime system use them to resolve translations from a central repository, the original developer maintains translation authority even for packages they no longer control after publication.
3Reliability
If text strings are translated at runtime using a global API, then translation consistency across all packages is achieved, but the system complexity increases
Solution Approach 1:
The patent extracts the translation logic into a separate global API layer that operates independently from package code. This extraction allows translation operations to be standardized and centralized without complicating individual packages. The global API handles the complexity of resource file loading, message key matching, and translation retrieval, while packages simply call the API with their text strings.
Solution Approach 2:
The patent uses resource message keys as copies or references that link source code to translation data without duplicating the full translation content in each package. This copying mechanism allows the system to maintain lightweight distributed packages while providing access to comprehensive translation data from a central repository, reducing overall system complexity.
Data Source
AI summary
A method, system, and computer program product for globalizing distributed software packages using a global API is disclosed. A text string in a source language is extracted from an independent package source code. An algorithm is used to calculate a resource message key for the text string. The resource message key and the text string are stored in a source language resource file. The text string is translated into an additional language to create a translated text string. The translated text string is stored with the resource message key in an additional language resource file. The independent package is distributed with the source language resource file, the additional language resource file, and the independent package program code bundled in the independent package.


