Search code examples
internationalizationabap

How to use two languages in an ABAP program?


I am working on an ABAP project and I want to use two languages for displaying texts.

On the registration screen the user can choose from two languages and the choice will be stored in a database table.

After login every texts must be at the selected language.

Do you have any ideas how to start implementing it?


Solution

  • SAP ABAP is built for i18n from the get-go.

    • All the string literals in the program can be made translatable by turning them into text symbols.
    • The text symbol screen has a separate tab for the selection screen as well
    • Messages can also have multiple language versions

    etc.

    What language will be displayed to the user depends on what language they picked on the SAPGui logon screen when they logged into the system. So you can easily try out other languages by starting a new SAPGui session with a different logon language. But if you want to override the logon language in your program for some reason, then you can do that with the ABAP keyword SET LANGUAGE.