<?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: string templates and text elements / translation ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates-and-text-elements-translation/m-p/348466#M6699</link>
    <description>&lt;P&gt;It looked promising until I tried. But you left out the important part: the trailing blank. It does not work with ` instead of '. More ideas?&lt;/P&gt;</description>
    <pubDate>Wed, 22 Feb 2017 13:00:50 GMT</pubDate>
    <dc:creator>former_member278728</dc:creator>
    <dc:date>2017-02-22T13:00:50Z</dc:date>
    <item>
      <title>string templates and text elements / translation ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates-and-text-elements-translation/m-p/348463#M6696</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;in a normal se38 report one could write someting like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: two TYPE i VALUE 2.
WRITE:  
/ 'I have '(t01) &amp;amp;&amp;amp; two &amp;amp;&amp;amp; ' eyes.'(t02), "I have2 eyes.  &amp;lt;-- wrong spacing  
/ `I have ` &amp;amp;&amp;amp; two &amp;amp;&amp;amp; ` eyes.`,  "I have 2 eyes. &amp;lt;-- ok  
/ |I have | &amp;amp;&amp;amp; two &amp;amp;&amp;amp; | eyes.|.  "I have 2 eyes. &amp;lt;-- ok&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The two text symbols T01 and T02 can be translated.  But I would like to use string templates because I don't want to care about trailing spaces.  You can not use text symbols with string templates as far as I know. &lt;/P&gt;&lt;P&gt;It results in a syntax error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;/ `I have `(t01) &amp;amp;&amp;amp; ... &amp;lt;-- Syntax error
/ |I have |(t01) &amp;amp;&amp;amp; ... &amp;lt;-- Syntax error&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Without text elements the Code Inspector complains (informational): "Strings without text elements are not translated."&lt;/P&gt;&lt;P&gt;Is this crippled by design? Am I missing something? &lt;/P&gt;&lt;P&gt;BTW: I know CONCATENATE and pragmas and a few other ways to work around. That's not the question.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 14:31:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates-and-text-elements-translation/m-p/348463#M6696</guid>
      <dc:creator>former_member278728</dc:creator>
      <dc:date>2017-02-21T14:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: string templates and text elements / translation ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates-and-text-elements-translation/m-p/348464#M6697</link>
      <description>&lt;P&gt;What about embedded expressions inside string templates? These work as desired.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;|{ 'I have'(t01) } |
|{ text-t01 } |&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Feb 2017 14:37:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates-and-text-elements-translation/m-p/348464#M6697</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-02-21T14:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: string templates and text elements / translation ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates-and-text-elements-translation/m-p/348465#M6698</link>
      <description>&lt;P&gt;Just to note that using text elements to construct sentences like&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;'I have '(t01)&amp;amp;&amp;amp; two &amp;amp;&amp;amp;' eyes.'(t02)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;is not a good idea, as word order varies from language to language. OK, for this sentence, it works at least in French and German, but you'd get problems with&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You must check the table &lt;EM&gt;table_name&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Since the German would be: &lt;STRONG&gt;Sie müssen die Tabelle &lt;EM&gt;table_name &lt;/EM&gt;kontrollieren. &lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 07:00:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates-and-text-elements-translation/m-p/348465#M6698</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2017-02-22T07:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: string templates and text elements / translation ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates-and-text-elements-translation/m-p/348466#M6699</link>
      <description>&lt;P&gt;It looked promising until I tried. But you left out the important part: the trailing blank. It does not work with ` instead of '. More ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 13:00:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates-and-text-elements-translation/m-p/348466#M6699</guid>
      <dc:creator>former_member278728</dc:creator>
      <dc:date>2017-02-22T13:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: string templates and text elements / translation ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates-and-text-elements-translation/m-p/348467#M6700</link>
      <description>&lt;P&gt;I don't see your problem ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;|{ 'I have'(t01) } | &amp;amp;&amp;amp; two &amp;amp;&amp;amp; | { 'eyes'(t02) }.|&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;gives "I have 2 eyes."&lt;/P&gt;&lt;P&gt;Same for&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;|{ 'I have'(t01) } { two } { 'eyes'(t02) }.|&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Mar 2017 13:28:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates-and-text-elements-translation/m-p/348467#M6700</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-03-22T13:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: string templates and text elements / translation ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates-and-text-elements-translation/m-p/348468#M6701</link>
      <description>&lt;P&gt;My fault. I tried to stick the space to the text. But it's hidden in what i thougt was syntax. Thank you very much for explaining. &lt;/P&gt;&lt;P&gt;For the records (and for my future reference because I will not remember this in 100 years): Here are the blanks: &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/26656-22-03-2017-15-50-34.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 14:55:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates-and-text-elements-translation/m-p/348468#M6701</guid>
      <dc:creator>former_member278728</dc:creator>
      <dc:date>2017-03-22T14:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: string templates and text elements / translation ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates-and-text-elements-translation/m-p/348469#M6702</link>
      <description>&lt;P&gt;"But it's hidden in what i thougt was syntax"&lt;/P&gt;&lt;P&gt;Without embeddeed expressions in { ... }, string templates are simply a kind of string literals |...| where blanks (and especially trailing blanks) are nothing but normal characters.&lt;/P&gt;&lt;P&gt;Their merit of course comes with embedded expressions |...{ ... }...{ ... }...|, where inside the curly brackets  you have ABAP operand positions.&lt;/P&gt;&lt;P&gt;Therefore writing it as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;|{ 'I have'(t01) } { two } { 'eyes'(t02) }.|&lt;/CODE&gt;&lt;/PRE&gt;makes it more clear.</description>
      <pubDate>Wed, 22 Mar 2017 15:17:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates-and-text-elements-translation/m-p/348469#M6702</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-03-22T15:17:05Z</dc:date>
    </item>
  </channel>
</rss>

