Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
monkeysource
Visitor

SceneGraph Localisation

Hi,

Trying to get SG component localised as to the Docs which state:



For strings defined in XML markup in a <children> element, or <interface> element field strings, the strings will be automatically translated by the Scene Graph application, if translations of the string exist in the localization files. If no translation file exists for the current locale, or no translation of the string exists in the translation file, the original string will be used.

I have a Label as:


<Label text="Hello"></Label>


And translation file as:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
    <file datatype="x-brs" original="components/MainScene.brs" source-language="en-US" target-language="de-DE">
        <body>
            <!--Insert Translations rows here similar to: <trans-unit id="0"><source>Select the style for the analog clock</source><target>Wählen Sie den Analog Clock Style</target></trans-unit>-->
        </body>
    </file>
    <file datatype="x-brs" original="source/main.brs" source-language="en-US" target-language="de-DE">
        <body>
            <trans-unit id="0">
                <source>Hello</source>
                <target>Hallo</target>
            </trans-unit>
        </body>
    </file>
</xliff>


But the label is not getting localised. i.e. it is always set to "Hello"

If I print tr("Hello") it gets translated as expected. 

Any ideas?

Thanks,

Ryan
0 Kudos