For normal database connections, I can specify "LANG=..." to choose a language that differs from the default language.

When events run within their internal connections, connection parameters do not apply. What language do they use - the default system language or the language of the user running the database engine?

(It seems the latter: When having "DE" as system language and "EN" as user language, a database engine running within the user context seems to generate event messages in "EN".)


Background: The question comes up as some typical event tasks have to deal with system procedures that may use different languages to return their textual success message - cf. that FAQ: sa_validate() should return a language-agnostic return value.

asked 03 Mar '15, 04:14

Volker%20Barth's gravatar image

Volker Barth
30.9k311457668
accept rate: 32%

edited 03 Mar '15, 04:23


The language for the locale of the account the server is running under.

From the DCX article on the SALANG environment variable you can follow the evaluation order on how that is determined.

"The first of the following methods that returns a value determines the default language:

  1. Check the SALANG environment variable.
  2. (Windows) Check the registry as set during installation or by dblang.exe.
  3. Query the operating system for language information.
  4. If no language information is set, English is the default."

For items 1, 3, and 4 those can come from the environment setting for the account. For example if running as a Windows service under the LocalSystem account (i.e. \.\SYSTEM) then those would be evaluated from the System environment. If running under another account then any settings in the user account's environment will take precedence.

Locale support is somewhat different under Windows than for Unix/Linux so expect some variability in how that operates but the software makes locale lookups appropriate to the platform.

From my understanding customer don't often use dblang or set SALANG, so it will often fall to the OS/User Locale setting (possibly overridden by user-specific settings).

HTH

permanent link

answered 03 Mar '15, 10:40

Nick%20Elson%20SAP%20SQL%20Anywhere's gravatar image

Nick Elson S...
7.3k35107
accept rate: 31%

Thanks for the clarifiction - I had read that article but wasn't really sure whether events would use the language of choice of the database engine's process - now I know they'll do.

(03 Mar '15, 10:59) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×35
×10

question asked: 03 Mar '15, 04:14

question was seen: 626 times

last updated: 03 Mar '15, 11:01