This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Add multi language labels with AML

Peter Borsje - Monday, April 22, 2013 3:40 AM:

 

Does anybody know how to add several languages to a label?

I tried the the AML below, but only the first label is executed and it is also added to the wrong language. Free2 was added to the dutch nl label. (My windows language is set on nl-language). Any suggestion?

 

 

<AML>
  <Item type="Property" action="merge" where="Property.name='cof_free_2' and Property.source_id=(select id from ItemType where ItemType.name='cof_Equipment')">
    <label xml:lang='en'>Free2</label>
    <label xml:lang='nl'>Vrijveld2</label>
    <source_id>
      <Item type="ItemType" action="get" select="id">
        <name>cof_Equipment</name>
      </Item>
    </source_id>
  </Item>
</AML>

part of the aml studio result looks like:

       <item_behavior>float</item_behavior>
        <keyed_name>cof_free_2</keyed_name>
        <label xml:lang="nl">Free2</label>
        <major_rev>A</major_rev>

 

 



Brian - Friday, May 3, 2013 12:48 PM:

Hi Peter,

Did you get this resolved?

Have at look at the Configuring Internationalization document from Aras downloads page. (http://www.aras.com/support/documentation/)

See page 27 on Add/Edit/Update queries.

In order to set a language value, other than the default, of a property you must specify the namespace as a property attribute.

<Item type="ItemType" id=" B88C14B99EF44982..." >
<i18n:label xml:lang="de" xmlns:i18n="www.aras.com/.../i18n:label>
<i18n:label xml:lang="en" xmlns:i18n="www.aras.com/.../i18n:label>
</Item>

If the namespace is not explicitly defined, then the value is assumed to be the value for the session language. 

So I think you need to be specifying the Item type to update (not the property) and then define the specific multilingual string property you are updating.

Hope this helps,

Brian.



Peter Borsje - Monday, May 6, 2013 1:20 AM:

Thanks Brian!

I managed to import with multi-language labels.

<AML>
  <Item type="Property" action="merge" where="Property.name='cof_free_2' and Property.source_id=(select id from ItemType where ItemType.name='cof_Equipment')">
    <i18n:label xml:lang="en" xmlns:i18n="http://www.aras.com/I18N">engels</i18n:label>
    <i18n:label xml:lang="nl" xmlns:i18n="http://www.aras.com/I18N">nedersland</i18n:label>
    <source_id>
      <Item type="ItemType" action="get" select="id">
        <name>cof_Equipment</name>
      </Item>
    </source_id>
  </Item>
</AML>

 

Peter