<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do you get the language of linked translation objects? in Windchill Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-do-you-get-the-language-of-linked-translation-objects/m-p/982987#M8979</link>
    <description>&lt;P&gt;Yes, I agree.&amp;nbsp; That attribute is on the source DD and on the translated DD.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that technically this can be controlled by a Translation Preference: "Document Language Attribute" but in practise customers use the out of the box setting PTC_DD_LANGUAGE.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Nov 2024 13:22:48 GMT</pubDate>
    <dc:creator>plutsky</dc:creator>
    <dc:date>2024-11-11T13:22:48Z</dc:date>
    <item>
      <title>How do you get the language of linked translation objects?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-do-you-get-the-language-of-linked-translation-objects/m-p/982814#M8977</link>
      <description>&lt;P&gt;Version: Windchill 12.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use Case: I am working in a Java workflow Expression robot, on an EPMDocument. My end result is I need to create new translation packages based on what that document had been translated into in past versions and iterations. I have the Starting Document, and all version, and I have the target translation package. How can I get the actual TranslationLink object, and get the language attribute, or how can I get the language of the translated package?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Description: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I tried querying for the Translation link like this, but&amp;nbsp; windchill indicates that source is not an attribute of TranslationLink.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;wt.query.QuerySpec qs = new wt.query.QuerySpec(com.ptc.arbortext.windchill.translation.TranslationLink.class);
				qs.appendWhere(new wt.query.SearchCondition(com.ptc.arbortext.windchill.translation.TranslationLink.class,
						com.ptc.arbortext.windchill.translation.TranslationLink.SOURCE_ROLE,wt.query.SearchCondition.EQUAL, epmDoc.getIdentity()));

				wt.fc.QueryResult linkResults = PersistenceHelper.manager.find(qs);
				while(linkResults.hasMoreElements()){
					com.ptc.arbortext.windchill.translation.TranslationLink link = (com.ptc.arbortext.windchill.translation.TranslationLink)linkResults.nextElement();
				      System.out.println("Lang ="+link.getLanguage());
				}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am getting the translation package like this, but I havent had any luck getting the language off of that document.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;wt.fc.PersistenceHelper.manager.navigate(nextObj, com.ptc.arbortext.windchill.translation.TranslationLink.ALL_ROLES, com.ptc.arbortext.windchill.translation.TranslationLink.class);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 19:35:37 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-do-you-get-the-language-of-linked-translation-objects/m-p/982814#M8977</guid>
      <dc:creator>AdamElkins</dc:creator>
      <dc:date>2024-11-08T19:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the language of linked translation objects?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-do-you-get-the-language-of-linked-translation-objects/m-p/982831#M8978</link>
      <description>&lt;P&gt;You can get the language of a persistable&amp;nbsp; object like an translation package or document by requesting it's PTC_DD_LANGUAGE attribute.&lt;/P&gt;&lt;LI-CODE lang="java"&gt;com.ptc.core.lwc.server.PersistableAdapter persistAdapObj = new com.ptc.core.lwc.server.PersistableAdapter((wt.fc.Persistable) linkedObj, null,java.util.Locale.US, new com.ptc.core.meta.common.SearchOperationIdentifier());	
persistAdapObj.load("IBA|PTC_DD_LANGUAGE");	
String strValue = (String) persistAdapObj.get("IBA|PTC_DD_LANGUAGE").toString();
System.out.println("Lang-"+strValue);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 21:44:40 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-do-you-get-the-language-of-linked-translation-objects/m-p/982831#M8978</guid>
      <dc:creator>AdamElkins</dc:creator>
      <dc:date>2024-11-08T21:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the language of linked translation objects?</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-do-you-get-the-language-of-linked-translation-objects/m-p/982987#M8979</link>
      <description>&lt;P&gt;Yes, I agree.&amp;nbsp; That attribute is on the source DD and on the translated DD.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that technically this can be controlled by a Translation Preference: "Document Language Attribute" but in practise customers use the out of the box setting PTC_DD_LANGUAGE.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 13:22:48 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-do-you-get-the-language-of-linked-translation-objects/m-p/982987#M8979</guid>
      <dc:creator>plutsky</dc:creator>
      <dc:date>2024-11-11T13:22:48Z</dc:date>
    </item>
  </channel>
</rss>

