<?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>Question Re: Return Query Result In Different Language? in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/return-query-result-in-different-language/qaa-p/13819364#M4850207</link>
    <description>&lt;P&gt;I'm not sure what you are asking.  Are you asking if the data from your database can be translated on the fly?  Maybe character sets?  Metadata?&lt;/P&gt;</description>
    <pubDate>Fri, 12 Mar 2010 02:25:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-12T02:25:54Z</dc:date>
    <item>
      <title>Return Query Result In Different Language?</title>
      <link>https://community.sap.com/t5/technology-q-a/return-query-result-in-different-language/qaq-p/13819362</link>
      <description>&lt;P&gt;We have been asked if it is possible to translate some reports to different languages on the fly (from an EN based database).&lt;/P&gt;

&lt;P&gt;So my question is, can I translate data stored as ENGLISH into some other language on the fly through the use of a procedure/view/etc?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2010 23:29:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/return-query-result-in-different-language/qaq-p/13819362</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-11T23:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Return Query Result In Different Language?</title>
      <link>https://community.sap.com/t5/technology-q-a/return-query-result-in-different-language/qaa-p/13819364#M4850207</link>
      <description>&lt;P&gt;I'm not sure what you are asking.  Are you asking if the data from your database can be translated on the fly?  Maybe character sets?  Metadata?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2010 02:25:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/return-query-result-in-different-language/qaa-p/13819364#M4850207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-12T02:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Return Query Result In Different Language?</title>
      <link>https://community.sap.com/t5/technology-q-a/return-query-result-in-different-language/qaa-p/13819365#M4850208</link>
      <description>&lt;P&gt;Yeah, that's what I'm asking (I'll edit to make it clearer)&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2010 03:24:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/return-query-result-in-different-language/qaa-p/13819365#M4850208</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-12T03:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Return Query Result In Different Language?</title>
      <link>https://community.sap.com/t5/technology-q-a/return-query-result-in-different-language/qaa-p/13819363#M4850206</link>
      <description>&lt;P&gt;Anything is possible, its all just software &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;But it is going to take a bit of work if you want "automatic" translation of english data.&lt;/P&gt;

&lt;P&gt;What you will need to do to automatically translate english text into another language is to write an external procedure that takes as input the english text and the language to which you want it translated and it outputs the translated text.  Something like:&lt;/P&gt;

&lt;LI-CODE lang="sql"&gt;create procedure translate_text(
                       in  en_text long varchar,
                       in  to_lang varchar(128),
                       out xx_text long varchar )
  external name '...'
  [ language &amp;lt;...&amp;gt; ]
&lt;/LI-CODE&gt;

&lt;P&gt;The external procedure can be written in C/C++, any CLR language, Java, Perl, or PHP... so pick your favourite programming language.  You will then need to have a method of doing the actual translation - perhaps sign up for one of those online automatic translation services?  (and if you do use an online service, perhaps they have a web service that you could use in which case you can just use SQL Anywhere's client web services capability).&lt;/P&gt;

&lt;P&gt;You will also need to be conscious of character set used by the external translation service and to make sure that the database text is converted to the proper charset before sending it to the service - this can easily be done using csconvert().&lt;/P&gt;

&lt;P&gt;Alternatively, if what you need to do is be able to translate statically known english text into other languages - e.g. pre-known report titles column names, footnotes, etc. - then a much easier solution is to have a table that contains all of your text strings in each of the languages that you need to support.  E.g.&lt;/P&gt;

&lt;LI-CODE lang="sql"&gt;create table lang_strings (
       "name"   varchar(20)  not null,  -- an internal name given to each string
       "lang"   char(2)      not null,  -- 'en', 'de', 'jp', etc
       "text"   long varchar not null,  -- text of string in required language
       primary key( "name", "lang" )
);
&lt;/LI-CODE&gt;

&lt;P&gt;You will then need to change your app to not use static strings for any english text, but to pull the text from this table.&lt;/P&gt;

&lt;P&gt;The table method is what is used in a number of application - e.g. the Check-for-updates system, and the Nexus (aka dbsupport) system.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2010 14:52:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/return-query-result-in-different-language/qaa-p/13819363#M4850206</guid>
      <dc:creator>MarkCulp</dc:creator>
      <dc:date>2010-03-12T14:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Return Query Result In Different Language?</title>
      <link>https://community.sap.com/t5/technology-q-a/return-query-result-in-different-language/qaa-p/13819366#M4850209</link>
      <description>&lt;P&gt;I wonder... are there any web services that can do this? ...say, from Google? (you know, those guys who win competitions for automatic translation)... you doing anything this weekend, Mark? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Mar 2010 09:56:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/return-query-result-in-different-language/qaa-p/13819366#M4850209</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2010-03-13T09:56:40Z</dc:date>
    </item>
  </channel>
</rss>

