摘要 |
A method, non-transitory computer readable medium, and apparatus for transforming a programming language neutral string content are disclosed. For example, the method searches for a master string needed by a component, wherein the master string comprises the programming language neutral string content including one or more pre-defined variables, subscribes the component to the master string and selects one or more profiles to transform the one or more pre-defined variables of the master string into a format of a programming language for a desired platform that uses the component. |
主权项 |
1. A method for transforming one or more pre-defined variables of a programming language neutral string content, comprising:
storing, by a processor, a plurality of definitions for each one of the one or more pre-defined variables, the one or more pre-defined variables comprising at least one of: a fraction, a large fraction, a whole number, a large whole number, a string, a new line, a hot key, a tab, a decorator or a special character, and a plurality of different profiles, wherein each one of the plurality of different profiles is associated with one of a plurality of different programming languages and provides a translation for the each one of the one or more pre-defined variables that are defined for a respective one of the plurality of different programming languages; searching, by the processor, for a master string needed by a component for a programming language of the plurality of different programming languages, wherein the component comprises one or more languages, one or more output files and one or more profiles of the plurality of profiles, wherein the master string comprises the programming language neutral string content including the one or more pre-defined variables; subscribing, by the processor, the component to the master string; selecting, by the processor, a profile associated with the master string to transform each one of the one or more pre-defined variables of the master string into a format of the programming language for a desired platform that uses the component, wherein the master string includes the plurality of different profiles; receiving, by the processor, a request for a content of the component; retrieving, by the processor, the content that is requested for each one of the one or more languages of the component; and placing, by the processor, the content that is requested in each one of the one or more languages of the component in each one of the one or more output files of the component. |