API Platform Conference 2026 - Lille (France) & Online

Locale::minimizeSubtags

locale_minimize_subtags

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

Locale::minimizeSubtags -- locale_minimize_subtagsRemove likely subtags from a locale

说明

面向对象风格

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

过程化风格

function locale_minimize_subtags(string $locale): string|false

Minimizes a locale tag by removing subtags that can be inferred using the ICU likely subtag data. For example, en_Latn_US becomes en.

参数

locale

The locale to minimize.

返回值

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

错误/异常

Throws a ValueError when the locale argument contains null bytes.

参见

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。
To Top