Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member186017
Active Participant

Background

In general the Regionalization feature enables displaying different runtime content for different users according to some algorithm which I will show later on.

Basically a "Region" is simply a string that provides us the information about which content will be displayed to the user.

The list of Regions is available under "System Administration" -> "Runtime Settings" -> "Regional Settings".

Once you enable the Regionalization check box, you'll be able to add Regions. (Note that you can not delete Regions that you've added so use it carefully...)

In this editor, the administrator can also define the "Default" region.

The "Default" region will be used in case no stronger conditions holds in the algorithm (mentioned bellow).

Each user can choose a "Region" that suits him from the list that the administrator created. (Of course the administrator can do that for users as well)

This is done by opening the personalization of the user and navigating to the "Regional Settings" entry:

As you probably know, every user has a "language" attribute which could be defined in the personalization settings under "User Profile"

In case the language is not "enough", each user can enhance it by choosing a "Locale" = <language>_<country>, this is done by choosing a bi-value attribute in the "Language" property like "English (Canada)" which is represented as "en_CA" like in this case:

If the user defines himself such a bi-value attribure it is considered as a "Locale" in the algorithm.

Note that in case the "Language" property stays empty, the locale parameter will be taken from the browser (for more details check SAP note 1653509).

The "Algorithm"

When an administrator creates regionalized content (will be shown later on), he can choose a relevant "Region" and a relevant "Locale" for each page.

This means that there will be several pages. The algorithm bellow describes which page will be displayed to the user:

1. FULL MATCH - The combination of "Region" + "Locale" of the page matches the combination of "Region" + "Locale" of the user.

2. REGION + LANGUAGE MATCH - The combination of "Region" + "Language" of the page matches the combination of "Region" + "Language" of the user.

3. REGION MATCH - The "Region" of the page matches the  "Region" of the user.

4. LOCALE MATCH - only the "Locale" of the page and the "Locale" of the user match.

5. LANGUAGE MATCH - only the "Language" of the page and the "Language" of the user match.

6. DEFAULT REGION - if none of the conditions above holds, the page created with the "default region" will be shown (in case such a page exists).

7. RANDOM REGION - if none of the conditions above holds, one of the pages will be displayed randomly.

Regionalized Content Creation

First of all make sure that the "Regionalization" setting is enabled (as shown in the first image of this blog).

Under "Area Management" -> "Content Editor" you can create an Area under the the "Staging Area".

Now create a new page. You will notice that a new button will appear on the editor "Change User Profile".

Click that button and choose the "Region" and the "Language" that will define this page (the language could be also specified as "Locale")

In this example I chose "Empty Region" with "English" (since "Empty Region" is not really a region, and I did not specify a language that is considered as a "Locale", the first condition from the algorithm that could hold is condition number 5)

Now I will create the page:

I know that there are "German" speaking users who would also like to view this page, therefore, I would like to create a duplicate of this page for them.

For that I will choose the page I created:

And click the "Change User Profile" in order to change the language to "German".

After changing the language I will select the page in the table and click the "Duplicate" button.

You will see that the new page appears, and that it is a duplicate of the other one.

I would like to edit this page to suit the German speaking users:

As you can see I am not very good in that language , but now this page represents the one that should be shown for users with that defined language.

I will publish that page and get back to the page editor:

Note that only the "German" page was published, however, the "English" one is still not published.

it is importnat to publish that page as well, otherwhise, all users will see only the published page which is "German".

In order to publish the other page, select it in the table and click "Switch Profile and Edit".

Publish the "English" page as well.

Now I will publish the Area itself :

All that left is to connect that area to a role and assign that role to both "English" and "German" speaking users.

The "English" speaking users will see the "English" page and the "German" speaking users will see the "German" page.

Related Notes

1614966

1653509

1712850