Showing posts with label translation. Show all posts
Showing posts with label translation. Show all posts

Thursday, 29 December 2016

Download FND new messages in Other langauges


To download the FND new messages in other languages, first we need to set the NLS lang.

To get the correct setting query FND_LANGUAGES as below

Find the language from FND_LANGUAGES

select NlS_LANGUAGE||'_'||NLS_TERRITORY||'.'||NLS_CODESET from FND_LANGUAGES WHERE INSTALLED_FLAG IN ('I','B');

For example for Simplified Chinese use:

For Download:
$ export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16CGB231280"

$ FNDLOAD apps/<AppsPwd> Y DOWNLOAD$FND_TOP/patch/115/import/afmdmsg.lct  FND_NEW_MESSAGES APPLICATION_SHORT_NAME=XXCUST MESSAGE_NAME=XXCUSTMSG

For Upload:
Note: Do not set any nls lang varaible.. if you have previously alter NLS LANG then disconnect from session and then do upload
FNDLOAD apps/<Apps Password> 0 Y UPLOAD $FND_TOP/patch/115/import/afmdmsg.lct XXCUSTMSG_MSG_ZHS.ldt - UPLOAD_MODE=NLS CUSTOM_MODE=FORCE WARNINGS=TRUE

Workflow translation


Introduction:

Recently came across a situation, where in we need to translate workflow notifications to Simplified Chinese. We evaluated multiple methods 

Approach 1:
  1. Set the NLS_LANG on the desktop and edit the workflow  and update messages with Chinese translations.
  2.  Remove all standard and flex fields workflow from the current definition.
  3.  Set NLS_LANG to ”SIMPLIFIED CHINESE_CHINA”.ZHS16GBK and then upload the workflow using WFLOAD

Approach 2:
1.       Open the workflow in notepad and set the language to ZHS.
2.       Remove all standard and flex fields workflow from the current definition
3.       Update message subject and body with Chinese translations
4.       Set NLS_LANG
5.       Upload the .wft using FNDLOAD and using afwfload.lct

Approach 3:
1.       Give a SQL script to update subject and body columns of WF_MESSAGES_TL for ZHS language as we are only translating the messages and not changing any other part.

Finally we went with approach 3 as it is simple and just we need notifications in simplified Chinese but instead of simple update we went with API approach. Here are the steps..


---First, set the session language:
execute immediate 'alter session set nls_language='||''''||'SIMPLIFIED CHINESE'||'''';

-- Secondly, set the WF mode and access levels..
wf_core.upload_mode := 'FORCE';
wf_core.session_level := 100;

-- Prepare tables, if we want to execute the script in patch edition
-- Need to prepare the seed tables
ad_zd_seed.prepare('WF_MESSAGES');
ad_zd_seed.prepare('WF_MESSAGES_TL');
ad_zd_seed.prepare('WF_RESOURCES');

-- Finally call the API with message

WF_LOAD.UPDATE_MESSAGE (
  p_type =>  'XXCSWF', -- wf type
  p_name => 'XXMSGNAME',  -- message name
  p_subject => l_subject,  -- message subject in Chinese
  p_body =>  l_msg_body,  -- message body in Chinese
  p_html_body => l_body ,   -- message html body in Chinese.
  p_level_error => x_level_error);

         -- Commit or rollback based on success/failure

Note: Use 
SET SERVEROUTPUT ON;
SET DEFINE OFF;
SET VERIFY OFF;

to turn off substitution.