How to translate only some text in a textbox

This forum allows users to post and respond to "How Do I Do ....." questions. The information contained in this forum has not been validated by K-Rise Systems and, as such, K-Rise Systems cannot guarantee the accuracy of the information.
Post Reply
CathyC
Posts: 472
Joined: November 16th, 2021, 11:15 am
Contact:

How to translate only some text in a textbox

Unread post by CathyC »

I have a page with a text area that I populate text in. Here is what it looks like
Translate tags showing.png
I have some text at the top followed by a bunch of addresses. The text needs to be translated, but the addresses shouldnt be
I see the text box has a "Translate" property on it.
address restrictions.PNG
I know then when there is text in an html generic control i should put it in <EPTranslate></EPTranslate> tags

I tried setting it to Translate False and putting the tags around the text I want translated, but it shows the translate tags too.

Is there a way to do this?
Last edited by CathyC on May 2nd, 2023, 11:06 am, edited 1 time in total. word count: 105

Tags:
CathyC
Posts: 472
Joined: November 16th, 2021, 11:15 am
Contact:

Re: How to translate only some text in a textbox

Unread post by CathyC »

I ended up changing the title to carry the text I need translated. I'm curious if the partial translate within the textbox is possible, but I found a workaround, so its no longer needed.

I did find though that the refresh of the page did not create the translation record. I had to manually create the record in the IDE work with translations screen. After it existed in the dictionary, it translated.

Is it something about translating the textbox title that is not working?
address restrictions UI with changed title.png
address restrictions UI with changed title.png (7.95 KiB) Viewed 1720 times
address restrictions UI with changed title.png
address restrictions UI with changed title.png (7.95 KiB) Viewed 1720 times
word count: 111
SteveCap
Posts: 329
Joined: August 26th, 2021, 9:18 am
Contact:

Re: How to translate only some text in a textbox

Unread post by SteveCap »

The translate flag only turns in on/off for all text. To only translate partial text you would have to set the control translate = false. Then use a translate service on the text you want translated and then use a create service node to set the text property.
word count: 48
CathyC
Posts: 472
Joined: November 16th, 2021, 11:15 am
Contact:

Re: How to translate only some text in a textbox

Unread post by CathyC »

Ah the Translate service! Thanks, I didnt think of that. I see now that wouldve worked.

As for my second question, do you see any reason why it didn't automatically create the dictionary record?
Most of my application is translated and exists in the dictionary as a record now, but I want to make sure that the functionality to create new dictionary records is working still. Or if there is something special about the textbox title that makes it not work like expected.
word count: 84
SteveCap
Posts: 329
Joined: August 26th, 2021, 9:18 am
Contact:

Re: How to translate only some text in a textbox

Unread post by SteveCap »

Did you maybe still have translate set to false? It should have created the record and don't see anything that would have caused it not to other than that flag.
word count: 31
CathyC
Posts: 472
Joined: November 16th, 2021, 11:15 am
Contact:

Re: How to translate only some text in a textbox

Unread post by CathyC »

Ah thank you. I think I was thinking of the flag as the textbox itself, but it controls for the title and the text area. So similarly, if I had a textbox that shouldnt get translated, but a title that should, I would need to use a translate service for the text I want to display in the title and turn Translate Off for the textbox. Is that right?
word count: 69
SteveCap
Posts: 329
Joined: August 26th, 2021, 9:18 am
Contact:

Re: How to translate only some text in a textbox

Unread post by SteveCap »

That would be correct
word count: 4
Post Reply