Is it possible to translate only a specific part of a text description?

More
3 years 7 months ago #4159 by killa2458
Is it possible to translate only a specific part of a text description?

Example of my text:
Breathe a cone of rancid fire, choking opponents hit. This attack stops them from using breath weapons for #Duration and dealing up to #TotalDamage.
I want to switch #Duration to [x] seconds and #TotalDamage to [x] points of damage.

But when trying to modify this stuff i'm running into the problem of not being able to use the i2 localize component because it needs a set description(Which will change in parts for me). And Google Translate is slow not working with ui well since it loads late (about 3 seconds for longer descriptions).

Additional context:
I am already searching for those keywords and replacing them with something along the lines of <color=\"purple\">" + duration + " seconds" + "</color> so the final text after replacing it will look like

Breathe a cone of rancid fire, choking opponents hit. This attack stops them from using breath weapons for <color="purple">1.5 seconds</color>and dealing up to <color="orange">480 total damage</color>.

What should I do?

Thanks for taking the time to read this!

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago #4160 by Frank
Hi,
You can use Parameters to modify parts of the texts.

Check this page for some info and there is also an example scene that shows them in action.
inter-illusion.com/assets/I2LocalizationManual/Parameters.html

Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago #4163 by killa2458
I was looking at the parameters which you linked but it never shows an example of setting a global parameter by code only taking a specifically designated one. Can you toss me an example of setting one to a value then grabbing that value? I'm assuming creating that is just whatever the term you are looking for is in the text box ( {[x]} )

Please Log in or Create an account to join the conversation.

Time to create page: 0.570 seconds
Template by JoomlaShine