display field value in local language

Reply
Contributor
Posts: 42

display field value in local language

Hi,

How can I display a field value in local language? In table , field value will be stored in english but while displaying it should be changed to a local language.

Thnaks


Contributor
Posts: 42

Re: display field value in local language

Any hint will be highly appreciated....!!

Super Contributor
Posts: 644

Re: display field value in local language

Well the reason no-one is responding is that there is is no way within SAS to translate arbitrary text in one language into another language on the fly.  (As distinct from changing the font or the alphabet used to display results.)  I could suggest writing the data to a web page and then using Google Translate to handle the translation, but I do not know how feasible that might be.

If the values you want to translate are already known you could create a format in SAS and display the values using the format.  As an example, translate Yes and No into French:

Proc Format ;

     Value $YN_French

          'Yes'     =     'Oui'

          'No'      =     'Non'

     ;

Run ;

Then the format could be specified to display the French translation of values in a table entered in English:

Proc Print Data = have ;

     Format Answer $YN_French. ;

Run;

The underlying data would be unchanged (English) but the print version would be in French.

You could extend this to phrases, but only if the translation format is created first with all the required text to be translated.

Richard

Ask a Question
Discussion stats
  • 2 replies
  • 201 views
  • 0 likes
  • 2 in conversation