Skip to Content

Overview

SAP provides a tool, Portal Content Translation which translates portal object to other languages. However this tool is extremely cumbersome, time consuming with a lot of steps involved. Hence, got the idea of simplifying the process and make a tool which is easy and fast that works with just a click.

I would like to share with all of you about a utility that I had written for a project that I worked in. The requirement was to work on about 8000 iViews in order to change their properties like translation in 7 languages, adding Quick Link, Merge ID, help link and other similar things. So this was not possible with the standard utility.

h3. How this works

I searched a lot on SDN whether someone has come up with anything like this but did not find a complete solution.

There are lot of blogs on extracting the PCD structure that helped me creating this tool

For beginners have a look at a very helpful blog by Nilesh.                                    for(int i1=0; i1<sizeOfDataNode; i1+)</p><p>                                    {</p><p>                        </p><p>                                                for(int i=0;i<sizeofLocale; i)</p><p>                                                {</p><p>                                                            String localeLanguage = locales[i].toString().toUpperCase();</p><p>                                                            if(localeLanguage.startsWith(“<your search criteria”>))</p><p>                                                            {</p><p>                                                                        result.putAttribute(“com.sap.portal.pcm.Title”, locales[i]  , “<language specifc text”>);</p><p>                                                                        result.save();</p><p>                                                            }</p><p>                                                }</p><p>                                    }</p><p>                        }</p><p>                   }</p><p>            }</p><p>}catch(Exception e )</p><p>{</p><p>            System.out.println(“Main Error :”e.getLocalizedMessage());                  

}

h3. Creating custom data source

If you don’t have SAP table for getting the language specific text, you can create your own data supplier file and read data from there.

Create .property file and include your iView ID(something which is unique to iView), locale and the language specific text. Iterate over the PCD folder, get the iView ID(which is nothing put the ID that you gave while creating the iView), read the same from the property file and add to the Title property of the iView. This will translate the folder in few second.

This approach can be extended to work sets, pages, folders etc.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply