IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Localization of a SPS File Options · View
Rince2
Posted: Tuesday, July 22, 2014 10:22:03 AM
Rank: Member

Joined: 7/24/2008
Posts: 10
Location: Germany
Hi!

I am using StyleVision 2011 Enterprise R3 SP1 and I am searching for a way to localize the static text in the SPS file.

The idea would be to have a language selection field in the working XML data file like

<language>en</language>

and then to output a localized version for e.g. a heading based on the value of that language field.

Any ideas?! How do you localize your SPS files?

I do not want to manage a seperate SPS file for each language, which would be another solution, because I don't like to change numerous SPS files if there will be a change in the design.

Thank you for your feedback!

paul
Posted: Tuesday, July 22, 2014 1:30:43 PM
Rank: Advanced Member

Joined: 9/9/2005
Posts: 483
Location: AT
Hi,

The latest version of StyleVision bundles several example solutions to this problem in the 'Multiple Languages' section of the 'Examples' project (I'm pretty sure your version does too). Plus, there is a description of a couple of approaches in the documentation, as referenced online here.
Rince2
Posted: Tuesday, July 22, 2014 1:33:40 PM
Rank: Member

Joined: 7/24/2008
Posts: 10
Location: Germany
Thanks! I have no idea how I could not notice this - the example projects answered my question. Case closed :-)
Rince2
Posted: Tuesday, July 22, 2014 4:17:12 PM
Rank: Member

Joined: 7/24/2008
Posts: 10
Location: Germany
It's working now in the StyleVision user interface, I chose the second input file approach. But now I am having troubles to generate the report on the command line via the AltovaXML.exe tool. How to specifiy the second input file (my XML File containig the translations) to the processor? It seems only one input file is recognized via the -in parameter. In the generated XSLT I see

<xsl:variable name="Translation" select="document($Translation)"/>

which matches the name of the translation XML in the sources tab of the UI, and

<xsl:value-of-select="$Translation/id("TITLE")/Translation[@Language=$XML/data/language]"/>

where a to be translated text is matched. The target language is referenced in $XML/data/language.

When I do

AltovaXML.exe -xslt2 Report.xslt -in Data.xml -out Report.fo

Nothing is being output for the to be translated strings and no error message is produced...

What am I missing now?
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.