Linguist - adding words manually.
-
Hi,
How can I add manually words with translation into my .ts files?
Not all the words locate in my code, and using update linguist is not enough.
I need to add them staticlly. Anyway for doing that?I have parsing mechanism from external files (which are a json files) on my code with content of words that will appear on my screen and I need translation for them.
Please advice,
Best regards,
IL -
@IL said in Linguist - adding words manually.:
I have parsing mechanism from external files (which are a json files) on my code with content of words that will appear on my screen and I need translation for them.
Could you please give a more concise example of this use case? A screenshot would be great. Would your JSON file have both the word and translation for a particular language?
-
Hi,
Where are you getting these JSON file from ?
-
@SGaist Hi,
The .json files are written by me, the purpose is be able to change screens without compilation, but this is not the point.
Linguist give you the option to add translation only to text that locate in the code, I need option to add translation to text that will be generate during run-time.
Can I add translation to a pre-known words into .ts files?IL
-
Well yes it is, you seem to want dynamic text translation while having all possible translations statically built in your application.
How are these texts going to be handled by your application ?
-
Well yes it is, you seem to want dynamic text translation while having all possible translations statically built in your application.
How are these texts going to be handled by your application ?
-
Then why not provide your JSON in all required languages and use the appropriate one based on the language selection of your user ?
-
Then why not provide your JSON in all required languages and use the appropriate one based on the language selection of your user ?
-
You could use ID based translation rather that text.
Another idea would be to have a source file using QT_TRID_NOOP but that you don't compile as part of your application.