Page 1 of 2
Problem with Compiler variables in Translated text
Posted: Thu Mar 02, 2006 10:08 am
by Gareth Owen
We are using a Compiler variable as part of the software title.
Set in the script,
Set Variable TITLES to $TITLE$ R#RMXVERSION#
This works fine in the default non-localised installations.
when running the installation the title is for example "RomaxDesgner R12.3.0.x"
We are now trying to get a Chinese (PRC) version working,
We have gone thorugh the Translation wizard (it now works on our script by the way, thanks for the fix

).
When you run the installation the title variable is now set to
"RomaxDesigner R#RMXVERSION#"
Any ideas,
Posted: Thu Mar 02, 2006 10:09 am
by Gareth Owen
Here is an example screen shot
File Attached:
Screenshot_romaxinstaller.jpg
Posted: Thu Mar 02, 2006 11:18 am
by MichaelNesmith
Dear Gareth,
Compiler variables are not substituted in localized strings.
Posted: Thu Mar 02, 2006 11:46 am
by Gareth Owen
That is what I thought, any idea how the all references to these Compiler variables are set to the string?
I have checked through the translator tool and in the
Set Variable Commands category
the first item is a compiler variable.
#RMXVERSION#
How can I remove this?
Posted: Thu Mar 02, 2006 12:01 pm
by Gareth Owen
Here is a very simple project that just sets the $TITLE$ variable to $TITLE$ #MYVERSION#
#MYVERSION# is set to 1.2.3.4
Then displays the $TITLE$ in a message box.
With no localisation, the message box reads
TITLE: My Installation Project 1.2.3.4
Once the localisation tool has been used, importing just English and Chinese (PRC) - the only change is to the Message Box Title
the message box now reads
TITLE: My Installation Project #MYVERSION#
How do I get round this?
File Attached:
My Installation Project.rar
Posted: Thu Mar 02, 2006 12:59 pm
by MichaelNesmith
Dear Gareth
A simple workaround is available: Just set an ordinary variable to the compiler variable all the way on top of your script. And then use that ordinary variable in place of the compiler variable everywhere else.
Posted: Fri Mar 03, 2006 2:44 am
by Gareth Owen
Hmm, been there, already tried that, it works fine until you do the translation.
Set Variable LOCALVERSION to #MYVERSION#
Set Variable $TITLE$ to $TITLE$ $LOCALVERSION$
MessageBox: Title, TITLE: $TITLE$$NEWLINE$COMPILER VAR: #MYVERSION#$NEWLINE$LOCAL VAR: $LOCALVERSION$
I have included another sample project that shows this issue. along with a screen shot and the translations.
I have only used the Chinese (PRC) and English translations.
Please help

File Attached:
My Installation Project.rar
Posted: Fri Mar 03, 2006 10:32 am
by MichaelNesmith
Hi Gareth
Oh very true...I think you can just get rid of the compiler variable alltogether, and simply use a Set Variable MYVAR to "something", and then localize that "something" text only.
Posted: Mon Mar 06, 2006 2:37 am
by Gareth Owen
This is for an automated build, the whole purpose for this is to get the value of the compiler variable (specified in the build process through the command line) into the installation title.
Unfortunately replacing the compiler variable with simple text will not work.
The whole point here is that I do NOT want to localise this.
Cheers
Posted: Mon Mar 06, 2006 4:17 pm
by MichaelNesmith
OK, so you have various possible values...and you can do a Set Variable for each in the script, protected by compiler variable blocks. And then you can translate each of the Set Variables normally, but ultimately only one will be included in the final setup, using compiler variables.
Posted: Mon Mar 06, 2006 5:00 pm
by Gareth Owen
Hi Michael, not sure I quite understand the last post,
The whole point here is that I do not want to translate the compiler variables, it is the build number of the software.
The title of the software needs to be
$TITLE$, version number.
This will be the same for all languages.
The version number is specified by a command line option when compiling the application.
Can you give me an example how I would get this to work?
Posted: Wed Mar 08, 2006 8:51 am
by Gareth Owen
Any news on a way to do this
we are getting quite close to the point where we are going to need to start shipping software to China.
I need to determine how best to get the correct version number into the build title.
Cheers
Posted: Wed Mar 08, 2006 1:12 pm
by MichaelNesmith
You do not need to use compiler variables for that. You can just say set variable TITLE to $TITLE$ $VERSION$. See the list of pre-defined variables in the help index.
Posted: Thu Mar 09, 2006 5:26 am
by Gareth Owen
Ok, that seemed to work for the Version number.
So let me get this straight,
You can use compiler variables in the GUI screens which set predefined variables such as $VERSION$, in this case they are not translated.
But you cannot use them in the script section as they get translated.
Am I correct so far?
If this is true, it allows me to work around the main title issue we have by using the $version$ variable in the code, but it does not help for the other 3 compiler variables that are used in the code, non of which have an equivalent predefined variable.
One of these variables is a Boolean, so I guess I could use a Compiler IF statement and set a local variable to true or false,
but I have 2 other variables that are basic strings that I need access to in the installer, but need to be untranslated.
Is there any way to do this?
Ahhhhh!
Posted: Tue Mar 14, 2006 3:42 am
by Gareth Owen
Well I had finally managed to work my way around most of the problems with compiler variables.
The main thing I did was to specify the Version on the initial GUI as the compiler variable #RMXVERSION#
Then all references within the script were set to $VERSION$
this seemed to work Ok.
I have now just installed IA 5.3
and guess what, now the compiler variable on the Project Properties page also gets translates to the string #RMXVERSION#
Back to square 1.
Is this planned functionality?
If so, PLEASE tell me how I pass in version information through the command line when using localized installations.
and Please can we have an option to NOT translate compiler variables.
It would solve so many of the issues I am having here.
Cheers