0

My current application is running with NLS_lang as American.america on Oracle forms. We are planning make this application available on multilanguage. we are in the process of the modifying the code to handle application labels, prompts,hint, messages,etc run time. we dont want to change the time/date formats and leave it as it would in American.america. But for example, When i change the NLS_lang to French_canadian or anything else. Along with the language the date formats and date language paramters are changing. I am in need to change the NLS_lang as that is the only way i can translate the oracle error messages. But my date formats having DD-MON-YYYY format in Oracle DB create a problem in my weblogic sesssion. Is there are way to only change my weblogic session for my forms to be French_canadian but leave the date formats/ date format languages in American? Can we make this happen? except Language other paramters to remain same as american??? Please help.

Advance thanks for your time and valuable ideas...

1 Answers1

0

You can set language and date/time formats individually. Have a look at these parameters:

  • NLS_DATE_FORMAT
  • NLS_DATE_LANGUAGE
  • NLS_LANGUAGE
  • NLS_TERRITORY
  • NLS_NUMERIC_CHARACTERS

NLS_LANG is used to define the default for all these, but each of them can be different. With NLS_TERRITORY you can commonly set "NLS_DATE_FORMAT", "NLS_NUMERIC_CHARACTERS", "NLS_CURRENCY", and "NLS_ISO_CURRENCY"

See example here:

ALTER SESSION SET NLS_TERRITORY = 'germany';
ALTER SESSION SET NLS_LANGUAGE = 'polish';
ALTER SESSION SET NLS_DATE_LANGUAGE = 'french';

SELECT SYSDATE AS german_date_format, TO_CHAR(SYSDATE, 'Day') AS french_day FROM dual;
SELECT 1/0 AS polish_error_message FROM dual;

GERMAN_DATE_FORMAT   FRENCH_DAY
--------------------------------
23.01.14             Jeudi


SELECT 1/0 AS polish_error_message FROM dual
                 *
Error at line 1
ORA-01476: dzielnik jest równy zero
Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110
  • Even after performing the Alter session command, the date local variables in forms are getting populated in formats of the multilanguage set and not in American format. Example . the local date variable is storing the value as '22-Janv.-13', which i wanted to be '22-JAN-13' – user3183775 Jan 23 '14 at 23:00
  • Then forms itself format the date. Maybe it take settings from registry, can you have a look there. Usually it's the wanted behaviour that an application shows the date in format according end user local preferences rather than default preset of the server. – Wernfried Domscheit Jan 24 '14 at 06:38