Podręcznik:$wgShellLocale

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgShellLocale and the translation is 9% complete.

Other languages:
Deutsch • ‎English • ‎dansk • ‎español • ‎français • ‎italiano • ‎polski • ‎português • ‎português do Brasil • ‎русский • ‎日本語
Miscellaneous settings: $wgShellLocale
Locale for LC_ALL.
Wprowadzono w wersji:1.14.0
Usunięto w wersji:nadal w użyciu
Dozwolone wartości:nie określono
Domyślna wartość:'C.UTF-8' in MediaWiki 1.30;
'en_US.utf8' in MediaWiki 1.29 and earlier
Inne ustawienia: Alfabetycznie | Według funkcji

Szczegóły

Locale for LC_ALL, to provide a known environment for locale-sensitive operations. It is applied for all requests. In MediaWiki 1.29 and older it only affected "LC_CTYPE".

For Unix-like operating systems, this should be set to C.UTF-8 or an equivalent to provide the most consistent behavior for locale-sensitive C library operations across different-language wikis. If that locale is not available, use another locale that has a UTF-8 character set.

This setting mainly affects the behavior of C library functions, including:

  • String collation (order when sorting using locale-sensitive comparison)
    • For example, whether "Å" and "A" are considered to be the same letter or different letters and if different whether it comes after "A" or after "Z", and whether sorting is case sensitive.
  • String character set (how characters beyond basic ASCII are represented)
  • Language used for low-level error messages.
  • Formatting of date/time and numeric values (e.g. '.' versus ',' as the decimal separator)

MediaWiki provides its own methods and classes to perform many locale-sensitive operations, which are designed to be able to vary locale based on wiki language or user preference:

  • MediaWiki's Collation class should generally be used instead of the C library collation functions when locale-sensitive sorting is needed.
  • MediaWiki's Message class should be used for localization of messages displayed to the user.
  • MediaWiki's Language class should be used for formatting numeric and date/time values.
If multiple wikis are being served from the same process (e.g. the same fastCGI or Apache server), this setting must be the same on all those wikis.

See here for a list of Locale IDs (LCID).

The installer will set this value in the generated LocalSettings.php by looking at which locales are available. So if the preferred C.UTF-8 locale isn't available, the installer could potentially fallback to en_US.utf8.