Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help needed with Lolcale, LolalizedText and Translations #95

Open
matf4 opened this issue Oct 27, 2021 · 1 comment
Open

Help needed with Lolcale, LolalizedText and Translations #95

matf4 opened this issue Oct 27, 2021 · 1 comment

Comments

@matf4
Copy link

matf4 commented Oct 27, 2021

Hello, I'm using UA-ModelCompiler and I had problems with the Locale and possible translations.

In my ModelDesign.xml file I want to insert the possibility of having a description with multiple language options.
If I write this code

<opc:Object SymbolicName="Object1" TypeDefinition="MyType" SupportsEvents="true">
    <opc:BrowseName>Object1</opc:BrowseName>
    <opc:Description Locale ="en-US">This is the first object</opc:Description>
    <opc:Description Locale ="it-IT">Questo è il primo oggetto</opc:Description>
</opc:Object>

I get some kind of error:

However, running the UA.ModelCompiler.exe does not generate any errors.

Running my server I can see only the first Description even if In the beginning of the file I have:

<opc:ModelDesign
[...]
DefaultLanguage="it-IT">

The Reference (https://reference.opcfoundation.org/v104/Core/docs/Part6/F.10/) says

<Value>
    <ListOfExtensionObject xmlns="http://opcfoundation.org/UA/2008/02/Types.xsd">
        <ExtensionObject>
            <TypeId>
                <Identifier>i=297</Identifier>
            </TypeId>
            <Body>
                <Argument>
                    <Name>ConfigData</Name>
                    <DataType>
                        <Identifier>i=15</Identifier>
                    </DataType>
                    <ValueRank>-1</ValueRank>
                    <ArrayDimensions />
                    <Description>
                        <Text>[English Translation for Description]</Text>
                    </Description>
                </Argument>
            </Body>
        </ExtensionObject>
    </ListOfExtensionObject>
</Value>
<Translation>
    <Field Name="Description">
        <Text Locale="de-DE">[German Translation for Description]</Text>
        <Text Locale="fr-FR">[French Translation for Description]</Text>
    </Field>
</Translation>

so I also tried to follow this pattern but it doesn't recognize Descriprion, Text, Translation ... well, I don't know how to make it work.

Then I saw that the UA Model Design.xsd and it says (about Description on line 202-204):
"The Description the value of the Description attribute for the Node. This element includes an optional key that can be used to look up the Description for other locales in a resource DB. The validator automatically creates a generic Description from the BrowseName and NodeClass." (and the same for DisplayName).

I didn't find any other hint to use the Key of Description and even less how/where create/use the database with the related LocaleText.

Can you please help me figure out how to use multilanguage (in both cases, with Locale and Key)?
Thanks in advance!

@opcfoundation-org
Copy link
Contributor

Specifying a locale is a missing feature in the ModelDesign schema.
I will investigate what is involved in added it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants