How to translate the text dynamically in the program?

Hi All,
I have a requirement where I need to translate the text dynamically in the program based on the Language Key retrieved.
Let's say that the Login language is 'EN' and in the logic has retrieved the language 'IT'(based on some conditions). I have to transate the text(which is maintained using the text elements) to ITALIAN(IT) Language and send the same as an email.
Could you please tell me if any Function Module is available in SAP which translates the text Dynamically in the program. or is there any other way to translate the text dynamically in the program.
Could you please share your valuable inputs? Thank you in advance.
Thanks & regards,
Paddu.

you could use SET LOCALE LANGUAGE myLanguage - so you can switch to the desired language and all texts will selected from that language.

Similar Messages

  • How to fetch the text dynamically from text modules

    Hello All,
    I have a requirement where the I need to print the Form in multiple languages. For this I have created textmodules and maintianed translations as well. But for Spanish and Portugese there are two version languages. For example Spain has Spain english and South American english, similarly Portugal Portugese and Brazilian portugese.
    In se63 transaction, we dont have two versions.Only one of them is available.
    Therefore I've created a custom table where in which I will mainted country.langauge and textmodule name as 3 coloumns. I have cretaed a FM
    where in I pass the country and language as import params to get all the respective text modules.
    Now I tried to move the textmodules to some some structure which I finally moved it to Context part in Adobe form.
    Now I tried to create text module, by giving variable name in the text field. For example i have passed &st_dun_texts-email&.
    It says text module does not exist.
    I have also created using dynamic text.There field name would be passed.But In the output I am getting the Text module name but not the content inside the text module.
    The actual content which is there in the text module should be printed
    Can anyone please help me out on the above problem. ?  It is urgent....!!!!!

    you could use SET LOCALE LANGUAGE myLanguage - so you can switch to the desired language and all texts will selected from that language.

  • How to add UI elements dynamically in the views of webdynpro

    Hi Experts,
    Here i have a requirement where 2 text-box get added on a click of "ADD" button in the view during the execution of the Application. so is it possible to add the text-box to the view or not?
    if yes how can it be done.
    Thanks in advance
    Regards
    Lalitkumar.

    Even with these expanded requirements I wouldn't necessarily recommend dynamic UI element creation in WDDOMODIFYVIEW.
    If the UI element requirements are fairly static (2 text boxes for each push of the button), then consider using a Multi-Pane (http://help.sap.com/saphelp_nw70ehp1/helpdata/en/df/da8b412bb5b35fe10000000a1550b0/frameset.htm) or Row Repeater (http://help.sap.com/saphelp_nw70ehp1/helpdata/en/44/93d3792e8c60d6e10000000a114a6b/frameset.htm) UI element. These constructs will both create a series of UI elements based upon the number of context elements in a bound node.  Therefore if you want to generate two textboxes for each push of a button, in the button event handler you simple add another context element to the context node.  You don't need dynamic UI element creation or dynamic data binding.
    If you feel that you must use dynamic UI element creation, then first read up on the WDDOMODIFYVIEW phase model event.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d2/8acd409cc4dd50e10000000a1550b0/frameset.htm
    You then probably want to study these three blogs on the topic:
    /people/thomas.szcs/blog/2005/12/28/dynamic-programming-in-web-dynpro-abap--introduction-and-part-i-understanding-ui-elements
    /people/thomas.szcs/blog/2006/01/03/dynamic-programming-in-web-dynpro-abap--part-ii-handling-viewelements
    /people/thomas.szcs/blog/2006/02/22/dynamic-programming-in-web-dynpro-abap--part-iii-aggregations-and-ddic-binding-of-viewelements

  • Does anyone know how to do a text search in the new Safari for iPad iOS 7?

    Does anyone know how to do a text search in the new Safari for iPad iOS 7?

    The feature has been removed to make safari even less useable. You need to download a third party browser like atomic web browser to get the functionality you want back.
    Like many new IOS 7 "features", safari on the ipad is a FAIL.
    At least you can now bury safari in a folder containing hundreds of icons that you can only view 9 at a time.

  • How can I get the "text" field from the actionEvent.getSource() ?

    I have some sample code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.ArrayList;
    public class JFrameTester{
         public static void main( String[] args ) {
              JFrame f = new JFrame("JFrame");
              f.setSize( 500, 500 );
              ArrayList < JButton > buttonsArr = new ArrayList < JButton > ();
              buttonsArr.add( new JButton( "first" ) );
              buttonsArr.add( new JButton( "second" ) );
              buttonsArr.add( new JButton( "third" ) );
              MyListener myListener = new MyListener();
              ( (JButton) buttonsArr.get( 0 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 1 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 2 ) ).addActionListener( myListener );
              JPanel panel = new JPanel();
              panel.add( buttonsArr.get( 0 ) );
              panel.add( buttonsArr.get( 1 ) );
              panel.add( buttonsArr.get( 2 ) );
              f.getContentPane().add( BorderLayout.CENTER, panel );
              f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              f.setVisible( true );
         public static class MyListener  implements ActionListener{
              public MyListener() {}
              public void actionPerformed( ActionEvent e ) {
                   System.out.println( "hi!! " + e.getSource() );
                   // I need to know a title of the button (which was clicked)...
    }The output of the code is something like this:
    hi! javax.swing.JButton[,140,5,60x25,alignmentX=0.0,alignmentY=0.5,
    border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@1ebcda2d,
    flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,
    disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,
    right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,
    rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=first,defaultCapable=true]
    I need this: "first" (from this part: "text=first" of the output above).
    Does anyone know how can I get the "text" field from the e.getSource() ?

    System.out.println( "hi!! " + ( (JButton) e.getSource() ).getText() );I think the problem is solved..If your need is to know the text of the button, yes.
    In a real-world application, no.
    In a RW application, a typical need is merely to know the "logical role" of the button (i.e., the button that validates the form, regardless of whether its text is "OK" or "Save", "Go",...). Text tends to vary much more than the structure of the UI over time.
    In this case you can get the source's name (+getName()+), which will be the name that you've set to the button at UI construction time. Or you can compare the source for equality with either button ( +if evt.getSource()==okButton) {...}+ ).
    All in all, I think the best solution is: don't use the same ActionListener for more than one action (+i.e.+ don't add the same ActionListener to all your buttons, which leads to a big if-then-else series in your actionPerformed() ).
    Eventually, if you're listening to a single button's actions, whose text change over time (e.g. "pause"/"resume" in a VCR bar), I still think it's a bad idea to rely on the text of the button - instead, this text corresponds to a logical state (resp. playing/paused), it is more maintainable to base your logic on the state - which is more resilient to the evolutions of the UI (e.g. if you happen to use 2 toggle buttons instead of one single play/pause button).

  • How can I make a table cell extend beyond the page?  The text disappears when the cell becomes larger than the page.

    How can I make a table cell extend beyond a page?  The text disappears when the cell becomes bigger than the page.  I want the table to continue to the next page.

    As a student, you might be able to get Office for Mac from the college bookstore at a substantial discount. Otherwise, I think your best option for documents that need to be shared with Office users is to get one of the free Office clones such as LibreOffice.

  • How can i use text expander with the new Mavericks,

    how can i use text expander with the new Mavericks,

    I regret upgrading to mavericks for the same reason
    ftamez wrote:
    how can i use text expander with the new Mavericks,
    Now I have been searching - and you have to buy an app and it will cost you $34.99 (what a rip off)

  • How to use the separate symbol in the text field in the adobe form.

    Hi,experts,
    I don’t know how to use the separate symbol to make a paragraph separate into several lines correctly in the text field in the adobe form.
    Action:
    1. config the ADS successfully.
    2. create the adobe form with a mult-line textfield(binding the 'remark' context in the interface of the form) using sfp.
    3. create a WDA for invoke the form and transfer the 'remark' context data.
    I use the following codes to display the paragraph in the PDF document:
    CONCATENATE
    '1&#12289;aaaaaaaaaaa&#65307;'
    '2&#12289;bbbbbbbbb '
    '3&#12289;ccccccccccc'
    '4&#12289;ddddddddd'
    INTO remark .
    lo_nd_z_hr_php_payslip->set_attribute(
    EXPORTING
    name = `REMARK`
    value = remark ).
    But I found all the content aren't paragraph separate correctly in the text field in the adobe form when I run the WDA.
    Could you please give me some hints to make the paragraph separate correctly in PDF document? Thanks a lot in advance!
    My email is : [email protected]
    Best regards,
    Tao
    Edited by: wang tao on Apr 8, 2008 1:58 AM

    Hi,
    If it is just a one word value then you could use this in the exist event;
    this.rawValue    
    = util.printx(">?<*",this.rawValue);
    This changes the first character (represented by the ?) to uppercase (represented by the >) and all trailing characters (represented by the *) to lowercase (represented by the <).
    If you wanted something more general ... if they could also enter a middle name then you could call a function like;
    function        toTitleCase(textValue)
      return  textValue.toLowerCase().replace(/\b[a-z]/g, function replacer(match) { return match.toUpperCase(); });
    This uses a regex to change all lowercase letters following a word boundary to uppercase.
    Bruce

  • This is my first use of this program. How do I remove a page break? How do line up my drop down box along side the text box on the left of it? The drop down is for a multiple choice answer for the question to the left.

    This is my first use of this program. How do I remove a page break? How do line up my drop down box along side the text box on the left of it? The drop down is for a multiple choice answer for the question to the left of each drop down.

    See McAfee support to find out how to disable that McAfee feature - that isn't part of the normal Firefox installation.

  • How to add a text box in the layout (View)

    How to add a text box in the layout (View)

    Hi.
    Right Click in the RootUIElement container.
    Click Insert Element.
    Give Name: Input
    Type : Input Field.
    Press Enter.
    Regards
    Bala.

  • Am new at pages and cannot figure out how to insert a bullet where I want it in the text, not at the beginning of the paragraph.  Word was much easier for me

    Am new at this forum and also at pages and can't figure out how to insert a bullet where I want it in the text, not at the beginning of the paragraph.  I found word much easier to use.  Please help. Trying to do a resume.

    On a US keyboard it is Option + 8 (above the letters). •

  • How to find the text id for the text in the sales order

    Hi all,
    How to find the text id for the item-text in the sales order?
    There are different Text available in  the sales order under item like Warehouse instruction, CSR instruction...
    I want to know the corresponding Text id for the text ELECTRONIC ORDER COMMENT.
    Table TTXID contains the validation of the Text id.
    Please help me in knowing the way to identify the text-id from the text list..
    Thanks foryour help
    Suresh Kumar

    U can fetch the texts for the items using
    Read_text.
    Example:
        g_f_tdname = xvttp-vbeln.
        g_f_obj = p_obj.
        g_f_langu = 'DE'.
        REFRESH g_t_lines.
        CLEAR g_t_lines.
        CALL FUNCTION 'READ_TEXT'
             EXPORTING
                  id                      = p_var
                  language                = g_f_langu
                  name                    = g_f_tdname
                  object                  = g_f_obj
             TABLES
                  lines                   = g_t_lines
             EXCEPTIONS
                  id                      = 1
                  language                = 2
                  name                    = 3
                  not_found               = 4
                  object                  = 5
                  reference_check         = 6
                  wrong_access_to_archive = 7
                  OTHERS                  = 8.
        IF sy-subrc <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    The Required fields are,
    Text-id ,language,name,object.
    Let me know if you further require help.
    Regards

  • Why Acrobat x professional is changing the text formatting specifically the font family  and the font size of the text in my pdf on exporting it to Microsoft word file format ?How should i stop Acrobat x professional from doing that so that i get an exact

    Why Acrobat x professional is changing the text formatting specifically the font family  and the font size of the text in my pdf on exporting it to Microsoft word file format ?How should i stop Acrobat x professional from doing that so that i get an exactly same word file on exporting it from its pdf counterpart?

    I was testing the preciseness & efficiency of Adobe acrobat x professional's doc conversion capabilities. As i have to take a document editing project in future which is going to need lot of pdf to word and vice versa conversions . What I did was I created a test word document converted into a pdf using a pdf maker in my word 2007 , Acrobat did convert the document from word to pdf keeping everything in the source file intact , However when i tried the other way round and attempted to convert the same pdf to word 2007 file format I lost my formatting ?So the font that I used to create the pdf are the ones taken from word 2007 which i believe is using the fonts that are installed in my computer. Any suggestions on how to preserve the formatting of the document after converting it from pdf to word file format?
    Regards
    Mike

  • How to create  some columns dynamically in the report designer depending upon the input selection

    Post Author: ekta
    CA Forum: Crystal Reports
    how  to create  some columns dynamically in the report designer depending upon the input selection 
    how  export  this dynamic  report in (pdf , xls,doc and rtf format)
    report format is as below:
    Element Codes
    1
    16
    14
    11
    19
    10
    2
    3
    Employee nos.
    Employee Name
    Normal
    RDO
    WC
    Breveavement
    LWOP
    Sick
    Carers leave
    AL
    O/T 1.5
    O/T 2.0
    Total Hours
    000004
    PHAN , Hanh Huynh
    68.40
    7.60
    76.00
    000010
    I , Jungue
    68.40
    7.60
    2.00
    5.00
    76.00
    000022
    GARFINKEL , Hersch
    66.30
    7.60
    2.10
    76.00
    In the above report first column and the last columns are fixed and the other columns are dynamic depending upon the input selection:
    if input selection is Normal and RDO then only 2 columns w'd be created and the other 2 fixed columns.
    Can anybody help me how do I design such report....
    Thanks

    Hi Developer life,
    According to your description that you want to dynamically increase and decrease the numbers of the columns in the table, right?
    As Jason A Long mentioned that we can use the matrix to do this and put the year field in the column group, amount fields(Numric  values) in the details,  add  an filter to filter the data base on this column group, but if
    the data in the DB not suitable to add to the matrix directly, you can use the unpivot function to turn the column name of year to a single row and then you can add it in the column group.
    If there are too many columns in the column group, it will fit the page size automatically and display the extra columns in the next page.
    Similar threads with details steps for your reference:
    https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings 
    If your still have any problem, please try to provide us more details information, such as the data structure in the DB and the table structure you are currently designing.
    Any question, please feel free to let me know.
    Best Regards
    Vicky Liu

  • How to find out all the text elements in the report using Java?

    How to trace the contents of an rpt file?
    I am able to open the rpt file in my report viewer but can not trace it using the JAVA code.
    Actually, I need to find out all the text elements of rpt (Report) file and replace them with the contents of resource bundle.
    My Java code to open a report is given below:
    import com.crystaldecisions.reports.sdk.ISubreportClientDocument;
    import com.crystaldecisions.reports.sdk.ParameterFieldController;
    import com.crystaldecisions.reports.sdk.ReportClientDocument;
    import com.crystaldecisions.sdk.occa.report.data.ConnectionInfo;
    import com.crystaldecisions.sdk.occa.report.data.ConnectionInfos;
    import com.crystaldecisions.sdk.occa.report.data.Fields;
    import com.crystaldecisions.sdk.occa.report.data.IConnectionInfo;
    import com.crystaldecisions.sdk.occa.report.data.ParameterField;
    import com.crystaldecisions.sdk.occa.report.data.ParameterFieldDiscreteValue;
    import com.crystaldecisions.sdk.occa.report.data.Values;
    import com.crystaldecisions.sdk.occa.report.lib.IStrings;
    import com.crystaldecisions.sdk.occa.report.lib.PropertyBag;
    import com.crystaldecisions.sdk.occa.report.lib.PropertyBagHelper;
    import com.crystaldecisions.sdk.occa.report.lib.ReportSDKException;
    import com.crystaldecisions.sdk.occa.report.reportsource.IReportSource;
    public String viewRpt()
                   //1.) Setting Database Infos
                            IConnectionInfo iConnectionInfoObj=setDatabaseConnectionInfos();
                   //2.) Setting Report Path
                   String reportPath=u201DE:
    was60
    rptFilesLocation
    u201D;
                   reportPath=(reportPath!=null)?                                             reportPath:AppConstants.CONSTANTS.BLANK;
                   String reportName="report1.rpt";
                   String reportFullPath = reportPath +   rptName;
                 //3.) Setting Report Source
                             ReportClientDocument reportClientDoc = new ReportClientDocument();
                                              reportClientDoc.open(reportPath, 0);
                  IReportSource reportSource = reportClientDoc.getReportSource();
                  setReportSource(reportSource);
                  reportClientDoc.close();
              //4.) Setting the Fields Starts
              setFieldsCrystal(null);
              Fields fields = new Fields();
              ParameterField pfield1 = new ParameterField();
              Values vals1 = new Values();
              ParameterFieldDiscreteValue pfieldDV1 = new ParameterFieldDiscreteValue();
              pfield1.setName("@parameter1");
              pfieldDV1.setValue(u201Cvalue1u201D);
              vals1.add(pfieldDV1);
              pfield1.setCurrentValues(vals1);
              fields.add(pfield1);
              pfield1 = new ParameterField();
              vals1 = new Values();
              pfieldDV1 = new ParameterFieldDiscreteValue();
              pfield1.setName("@parameter2");
              pfieldDV1.setValue(u201Cvalue2u201D);
              vals1.add(pfieldDV1);
              pfield1.setCurrentValues(vals1);
              fields.add(pfield1);
              setFieldsCrystal(fields);
              //Setting the Fields Ends
    The sample jsp code to view the report is as follows:
    <%@taglib uri="http://www.businessobjects.com/jsf/crystalreportsviewers"
         prefix="bocrv"%>
    <bocrv:reportPageViewer viewerName="CrystalViewer"
                                                 reportSource="#{CrystalReportBeanObject.reportSource}"
                                                 displayToolbarRefreshButton="false"
                                                 allowDatabaseLogonPrompting="false"
                                                 allowParameterPrompting="false"
                                                 databaseLogonInfos="#{CrystalReportBeanObject.connectionInfosCrystal}"
                                                 parameterFields="#{CrystalReportBeanObject.fieldsCrystal}"
                                                 displayGroupTree="false" displayToolbarLogo="false"
                                                 displayToolbarToggleTreeButton="false"
                                                 enablePageToGrow="false" height="540"
                                                 zoomPercentage="100" width="750"
                                                 allowDrillDown="false"
                                                 displayToolbarPrintButton="true"
                                                 printMode="PDF"
                                                 ></bocrv:reportPageViewer>
    Edited by: JayKumarSharma on Mar 23, 2011 12:42 PM

    This is how you retrieve all the text fields in the reort:
    ReportObjects reportObjects = (ITextObject) oReportClientDocument.getReportDefController().getReportObjectController().getReportObjectsByKind(ReportObjectKind.text);
    for(int i=0; i< reportObjects.size();i++)
    ITextObject textObject = (ITextObject)reportObjects.get(i);
    // use ReportObjectController to modify the text object.
    If you want to modify the contents of the text element, you can do it as follows:
    TextObject oTextObject = new TextObject();
    Paragraphs oParagraphs = new Paragraphs();
    Paragraph oParagraph = new Paragraph();
    ParagraphElements oParagraphElements = new ParagraphElements();
    ParagraphTextElement oParagraphTextElement = new ParagraphTextElement();
    oParagraphTextElement.setText("This is the new text field");
    oParagraphTextElement.setKind(ParagraphElementKind.text);
    oReportClientDocument.getReportDefController().getReportObjectController().modify(textObject, oTextObject);
    oReportClientDocument.save();

Maybe you are looking for