cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Workflow localization, translation, multi-language WF-dialogs

MikeB
Contributor
4,592

Hi Workflow Gurus,

Question is about workflow localization / translation / globalization / internationalization…

Suppose, I have a complex workflow, which consists of a number of sub-workflows. This WF has been initially developed in English (including all dialogs), but now I want to offer this WF in other languages. Of course, I can begin to pass over each WF/sub-workflow element and to begin to type localized dialog via built-in translation tool of SAP where it is possible, but it may take a lot of time, especially if there are a lot steps in WF.

Is there any best practice for workflow localization, what is the best approach to supply the same workflow in English, German and French to your customers? Is there any way to get/build a dictionary of all dialog, used in all steps in WF and its subworkflows and after that to translate it to the desired language?

Thanks.

View Entire Topic
pokrakam
Active Contributor
0 Likes

For what it's worth, the approach that has always worked for me is:

- Build in English

- Use the translation tool to translate everything

- Log on in each language and update anything that's still in English

Simple.

Where it does get messy is when multiple languages are used during execution. If a French approver creates the next step it will be in French if the next user doesn't have the 'use own language' setting switched on. So switching off "Advance with dialog" will help as the subsequent step will be created by the WF system user in whatever system language it has been set to.

Regards,

Mike

MikeB
Contributor
0 Likes

Translation tool works great, when dialogs are hard-coded inside of workflow objects and not dynamically filled on runtime, as I tried to do in order to achieve more generic level of the workflow.

pokrakam
Active Contributor
0 Likes

If you do your hardcoding with standard texts or OTR then these can also be translated, should be easy enough?

MikeB
Contributor
0 Likes

If I, let say, write in User Decision title some text, I can translate it with translation tool, but if this text is supplied dynamically via ABAP code and binding, thus I don't know how to care about multi-language agents inside of the same process.

For example, at the beginning of the workflow I have a step «GetDialogs», where I programmatically generate dialogs for the whole process (via GetDialogs() method of the ABAP class), after that I pass an array with these dialogs to multiline workflow container. Then the specific line number passed to the concrete workflow step. And even if I paid attention to the localization problem at the step of dialog generation and supplied wanted translation via translation tool (text-001 approach), I don't know how to supply/pass to the workflow step not only the original text, but also translated to desired language text.

If it's possible to pass to the workflow container and to WF step dialogs on multiple languages (via translation tool), thus, I suppose, localization will work automatically, since WF engine can chose dialog version according to the specific agent SAP GUI language. But I don't know how to do that.

Hope, I have not confused you with my explanation 😉

pokrakam
Active Contributor
0 Likes

Y'know, it's possible to take abstraction too far and end up with abstraction being more effort than it's saving.

Anyhow, this is not a workflow translation problem, but simply that workflow is using a non-translated text. I can see many ways to do what you describe differently. As I suggested, you can use OTR texts in your code - you would need a language parameter.

Also, why generate them up front? There should be no need to carry all those texts in the WF container. A functional method can generate the text during binding.

Or you can use standard texts (SO10) and insert them dynamically into the task text. SapScript may be 20 years old, but you can still do some snazzy things with it, such as conditional texts or text ids from container elements:

* Dear &USER.FULLNAME&

/: INCLUDE &DYNHEADER& OBJECT TEXT ID ST

/: If <cond>

/: INCLUDE ZBODY1 OBJECT TEXT ID ST

/: ELSE

/: INCLUDE ZBODY2 OBJECT TEXT ID ST

/: ENDIF

Or you could use a dynamic task - several tasks with their respective texts and plug the one you need in at runtime.

Hope that gives you some ideas.

Mike

MikeB
Contributor
0 Likes

Thank you a lot, I'll check this way!

MikeB
Contributor
0 Likes

About SAPScript, I checked this option and found this stuff nice, the only question is can I provide to SAPScript the dynamically filled parameter, this variable will be filled by the content only at runtime, this in order to supply generic behaviour of the entire workflow.

About OTR, I read a couple of SCN Wiki papers, there they discuss OTR for BSP/WebDynpro/Smart-Forms, how exactly can I use it in case of workflow's send mail user decision component?

pokrakam
Active Contributor
0 Likes

Hi Mike,

Yes, you can pass dynamic parameters. This is what you already do in work item texts, which are SapScript. See example above, all the &VAR& elements are what would come from the Task container.

You can't however include variables in standard text. However it's just a matter of structuring your text in such a way that the main variables are near each other.

There's nothing stopping you from having larger blocks of text either:

/: IF <condition>

blah blah blah

more blahdiblah

...

and so the story ends

/: ELSE

Once upon a time...

...

the end.

/: ENDIF

Regarding OTR, I stand to correction but I don't think they can be used directly in WI texts. However it's just a matter of a simple functional method to read a text form the OTR and present it as a table of lines to include in your task text. You can do this in your WF->Task binding.

But from your description, I think dynamic tasks sound more interesting. Use a functional method to pull the right task in at runtime. Less messing around with texts.

Hope that helps,

Mike