cancel
Showing results for 
Search instead for 
Did you mean: 

What language is used for event connections?

VolkerBarth
Contributor
2,279

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

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

VolkerBarth
Contributor
0 Kudos

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.

Answers (0)