Template:Lang/doc

Return language setting, auto detect based on page URL or manually set, used by other templates for l10n.

Usage
Get language code (auto detect or previously set):

It will return the 2-characters language code: en/es/it ... etc.