Prevent control's value from being translated - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

mentalmushroom
Posts: 63
Joined: Wed Feb 08, 2012 8:08 am

Prevent control's value from being translated

My installer is localized to several different languages. There is a settings page where I have radio button group and checkbox controls. I want only the text visible to a user to be translated. Now when I choose a different language than project default, I have something like Property.MY_PROPERTY instead of true for my checkbox and something similar for the radio button group. I guess, this is because I didn't translate the corresponding entries (actually, I totally removed them from the .ail file, because I don't need a translation for them, but still it tries to translate them). How can I prevent AI from trying to translate the values?
No milk today
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Prevent control's value from being translated

Hello,

To skip the translation of a control from the Dialogs page, click on the blue flag button on the right of the Display > Text property on the right pane.
In the localization dialog simply select "Never translate the string".

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mentalmushroom
Posts: 63
Joined: Wed Feb 08, 2012 8:08 am

Re: Prevent control's value from being translated

I want the text to be translated, but I don't want it to translate the value. For example, the checkbox may have text "My option lalala", that should be translated, but its value "true" or "false" I want to keep the same, because it is not visible to user and I check it in the custom action.
No milk today
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Prevent control's value from being translated

By default, the values should not be localized, you can see that in the attached example.

Make sure you haven't inserted the property in a custom dictionary and forgot to translate it or have altered the localization settings in any other way.

Regards,
Bogdan
Attachments
property value localization.aip
(17.07 KiB) Downloaded 872 times
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mentalmushroom
Posts: 63
Joined: Wed Feb 08, 2012 8:08 am

Re: Prevent control's value from being translated

I've checked your project. Values are not localized as long as User Interface is not checked in the project translation segments. If I check it, the following entries appear in the dictionary:

Code: Select all

  <ENTRY id="RadioButton.Text.RD_BTN_G#1">
    <STRING lang="en" value="RadioButton_1"/>
    <STRING lang="fr" value=""/>
    <STRING lang="de" value=""/>
  </ENTRY>
  <ENTRY id="RadioButton.Text.RD_BTN_G#2">
    <STRING lang="en" value="RadioButton_2"/>
    <STRING lang="fr" value=""/>
    <STRING lang="de" value=""/>
  </ENTRY>
I need User Interface translation, because users should see the translated GUI, but I don't want the values to be translated.
No milk today
mentalmushroom
Posts: 63
Joined: Wed Feb 08, 2012 8:08 am

Re: Prevent control's value from being translated

I see this question is not going to be answered. Please, just tell me is it possible to keep only values not translated, otherwise I will start translating them to all languages. Boring, but this seems to be the only way to do it so far.
No milk today
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Prevent control's value from being translated

Hi,

The sniped from the dictionary represents the localization identifiers of the text labels associated with the two radio button controls, not with the value
that will be placed in the property associated with the radio button group.

I select "User Interface" for localization too, generated the dictionary and built the setup. Still "false" or "true" was appearing in the edit control, based on the
selection I made on the radio buttons. Can you give me a screen-shot with the dialog displaying the incorrect value?

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mentalmushroom
Posts: 63
Joined: Wed Feb 08, 2012 8:08 am

Re: Prevent control's value from being translated

It seems to me the issue was caused by predefined values for the corresponding properties. I forgot to turn off translation for them, because it is not obviously seen on the install parameters page. Now it seems to work fine. Thanks for assistance and apologize for the long discussion.
No milk today
kissack
Posts: 57
Joined: Fri Feb 04, 2011 11:45 am

Re: Prevent control's value from being translated

If I still may, I'd like to ask you another question...
The translation works fine now, but I have a situation where I have two radiobuttons on a dialog. One radiobutton is supposed to be checked by default. This works when I install in default language (English). If I change the installation language, none of the radiobuttons is checked and that's not correct. I revised the AIL, but don't seem to see any default value translations or anything of that kind.

Any ideas ?

Kissack
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Prevent control's value from being translated

Hello Kissack,

I've tested your scenario, but I wasn't able to reproduce the behavior. Can you give us more details about your scenario? Also, can you attach a sample reproducing the behavior?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kissack
Posts: 57
Joined: Fri Feb 04, 2011 11:45 am

Re: Prevent control's value from being translated

Hello, regardless of the previous problem AI stopped translating default values in the texboxes and instead inserts Property.PROPERTY_NAME where default value should be. Any ideas?

Recently upgraded to AI 9.3, would that have anything to do with these changes in behaviour?
Attachments
TranslationIssue.png
TranslationIssue.png (34.6 KiB) Viewed 14661 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Prevent control's value from being translated

Hello Kissack,

This happens because the related controls properties are not localized. Please take a look on our "Localize a property's value" article in order to localize the related properties.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”