Momentary Button html multi line text translate issue

#1

I am unable to translate a mutli line text on a momentary button with html code. If I use the text as a single line with no html code, it works just fine. I can translate a multi line navigation button without issue. Has anyone been able to solve this situation?

0 Likes

#2

Since <html> is part of the string, it won’t match a key, unless you also put <html> in the translation. Which can be a pain, if you have a lot of them. Try an expression:

'<html>' + translate('The text you wish to translate')
0 Likes

#3

I was able to put “html” on my navigation buttons without an issue during translation. This scenario is specific to momentary buttons not using the translation.

0 Likes

#4

It also applies to other components, labels being one of them. :wink:

0 Likes

#5

Either I am not implementing your expression suggestion correctly, or it functions the same way as the previous method. expression

0 Likes

#6

OK, Now you’r e getting into more complex html. For that, you’ll need to make matching entries in the translation manager, including the html tags. Then you can reduce the text property back to

<html><center>CLEAR<br>ALARMS

As a quick sanity check on my end, are you using Ignition v7 or v8?

0 Likes

#7

That is how my translation manager looks, but does not function for momentary buttons. I am using ignition 7.9.12

0 Likes

#8

Hmm. I spun up my 7.9.9 server and it works okay. Can you do up a screenshot of your translation manger with the Clear Alarms entry showing?

I have meetings for a few hours, but I can revisit this afterward.

0 Likes

#9

I have shown the translation manager as well as the running screen. This shows the navigation buttons translating correctly, but no response from the clear alarms button.

0 Likes

#10

Attached is a window with a momentary button. I set up my translation manager to match the entry you have. Keep in mind that the text must exactly match the key. This may include any extra whitespace (I’ve been hit with that once or twice with spaces at the end of the key). If you find that everything matches okay, you may have to contact support.

Translate_test_JC_Translate_Test_2019-12-04_1019.proj (4.0 KB)


2019-12-04_10-17-13

0 Likes