• Leistungsspektrum
    Die passenden Lösungen für Ihre Anforderungen.
    Mehr Details unter der Rubrik: Leistungen
  • Professionelle Anwendungen
    Holen Sie mehr aus Ihren APEX Applikationen heraus.
  • Neueste Designs
    Nutzung von erweiterten Web 2.0 Möglichkeiten und Entwicklung von Corporate Designs
  • Individuelle Lösungen
    Entwicklung von Business-Anwendungen genau nach Ihren Wünschen.
  • Upgrade Lösungen
    Weiterentwicklung bestehender Anwendungen.
  • Schulungen und Vorträge
    Die passenden Schulungen genau für Sie zugeschnitten. Beispiel: Navigationsbeispiele
  • Plugins und Third Party Erweiterungen
    Erweitern Sie die Funktionalität ihrer Anwendungen mit einem modularen Entwicklungsansatz.

12 February, 2013

Automatic language detection bug in APEX 4.2.1

I already posted a forum entry to the topic but no one had answered yet. I think the bug is a real problem so people should know about it:
https://forums.oracle.com/forums/message.jspa?messageID=10840734#10840734

Here are the details:
Automatic browser language detection can not be used in APEX applications during their runtime.

In the environment I'm working at the moment we are developing mostly German applications but database standard character set is this:
SELECT * FROM NLS_DATABASE_PARAMETERS

Parameter Value
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET WE8ISO8859P15
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN


All applications are set up with "Globalization Attributes":
 Application Primary Language: German
 Application Language Derived From: Browser (use browser language preference)
 Application Date Format: DD.MM.YYYY


Default behavior should be:

In all former versions of APEX it changes the default settings from the database to the browser settings.
An now:
In the current version it does NOT change the language.

For example: 
APEX 4.1 displays number values like that
10.000,00

APEX 4.2.1 displays number values like that
10,000.00

If I check the debug log I find this:
0.04096 0.00016 S H O W: application="101" page="16" workspace="" request="" session="16485344217862" 4 
0.04110 0.00044 Reset NLS settings 4 
0.04155 0.00020 alter session set NLS_LANGUAGE="AMERICAN" 4 
0.04174 0.00016 alter session set NLS_TERRITORY="AMERICA" 4 
0.04189 0.00014 alter session set NLS_CALENDAR="GREGORIAN" 4 
0.04203 0.00014 alter session set NLS_SORT="BINARY" 4 
0.04217 0.00017 alter session set NLS_COMP="BINARY" 4 
0.04234 0.00003 ...NLS: Set Decimal separator="." 4 
0.04237 0.00014 ...NLS: Set NLS Group separator="," 4 
0.04251 0.00013 ...NLS: Set g_nls_date_format="DD-MON-RR" 4 
0.04264 0.00013 ...NLS: Set g_nls_timestamp_format="DD-MON-RR HH.MI.SSXFF AM" 4 
0.04277 0.00032 ...NLS: Set g_nls_timestamp_tz_format="DD-MON-RR HH.MI.SSXFF AM TZR" 4 
0.04309 0.00005 NLS of database and client differs, characterset conversion needed 4 
0.04314 0.00257 ...Setting session time_zone to +01:00 4 
0.04572 0.00005 NLS: Language=       

As you see the default language is set to: NLS_LANGUAGE = "AMERICAN"
But now the second task should be to switch the language to German but this doesn't happen. Log file shows action with an empty value: NLS: Language= #empty#
 
Issue happens in all browsers: FF, Chrome, IE

Somebody else had similar issues as I did:
https://forums.oracle.com/forums/thread.jspa?threadID=2477036&tstart=0

Hope some in the APEX universe can help me here?

Thanks

3 comments:

Anonymous said...

Hi Tobias

We had the sam problem. We use a process on page 0
'on load: before Header' type: pl/sql anonymous block:

begin
if upper(substr(owa_util.get_cgi_env('HTTP_ACCEPT_LANGUAGE'),1,1))='F' then
execute immediate 'alter session set nls_language=FRENCH';
apex_util.set_session_lang('fr');
elsif upper(substr(owa_util.get_cgi_env('HTTP_ACCEPT_LANGUAGE'),1,1))='D'
execute immediate 'alter session set nls_language=GERMAN';
apex_util.set_session_lang('de');
end if;
end;


hope this helps
regards

Charly

Joel R. Kallman said...

Hi Tobias,

There is now a patch for this bug on My Oracle Support - Patch 16030411.

Thank you for informing the community about this error.

Joel

Alex Bandit said...

Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles.Keep up the good work! certified translation toronto