Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Locale::acceptFromHttpLocale::canonicalize>
^LocaleLast updated: Mon, 26 Oct 2026

Locale::addLikelySubtags

locale_add_likely_subtags

(No version information available, might only be in Git)

Locale::addLikelySubtags -- locale_add_likely_subtags — Add likely subtags to a locale

Description

Object-oriented style

public static function Locale::addLikelySubtags(string $locale): string|false

Procedural style

function locale_add_likely_subtags(string $locale): string|false

Expands a locale tag by adding likely subtags based on the ICU locale data. For example, en becomes en_Latn_US.

Parameters

locale

The locale to expand.

Return Values

Returns the locale with likely subtags added, or false on failure.

Errors/Exceptions

Throws a ValueError when the locale argument contains null bytes.

See Also


<Locale::acceptFromHttpLocale::canonicalize>
^LocaleLast updated: Mon, 26 Oct 2026