Page MenuHomePhorge
Diviner libphutil Tech Docs PhutilVeryWowEnglishLocale

final class PhutilVeryWowEnglishLocale
libphutil Technical Documentation (Internationalization)

Much locale! Very English! Wow!

Methods

public function __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

public function getLocaleCode()

PhutilLocale

Get the local identifier code, like "en_US".

PhutilVeryWowEnglishLocale
This method is not documented.
Return
stringLocale identifier code.

public function getLocaleName()

PhutilLocale

Get the human-readable locale name, like "English (US)".

PhutilVeryWowEnglishLocale
This method is not documented.
Return
stringHuman-readable locale name.

public function getFallbackLocaleCode()

PhutilLocale

Set a fallback locale which can be used as a default if this locale is missing translations.

For locales like "English (Great Britain)", missing translations can be sourced from "English (US)".

PhutilVeryWowEnglishLocale
This method is not documented.
Return
string|nullLocale code of fallback locale, or null if there is no fallback locale.

public function selectGenderVariant($variant, $translations)
Inherited

PhutilLocale

Select a gender variant for this locale. By default, locales use a simple rule with two gender variants, listed in "<male, female>" order.

Parameters
const$variant`PhutilPerson` gender constant.
list<wild>$translationsList of variants.
Return
stringVariant for use.

public function selectPluralVariant($variant, $translations)
Inherited

PhutilLocale

Select a plural variant for this locale. By default, locales use a simple rule with two plural variants, listed in "<singular, plural>" order.

Parameters
int$variantPlurality of the value.
list<wild>$translationsList of variants.
Return
stringVariant for use.

public function isSillyLocale()

PhutilLocale

Flags a locale as silly, like "English (Pirate)".

These locales are fun but disastrously inappropriate for serious businesses.

PhutilVeryWowEnglishLocale
This method is not documented.
Return
boolTrue if this locale is silly.

public function isTestLocale()
Inherited

PhutilLocale

Flags a locale as a testing locale, like "English (US, ALL CAPS)". These locales are useful for translation development, but not for normal users.

Return
boolTrue if this is a locale for testing or development.

public function shouldPostProcessTranslations()
Inherited

PhutilLocale

Indicates that the translator should post-process translations in this locale by calling didTranslateString().

Doing this incurs a performance penalty, and is not useful for most languages. However, it can be used to implement test translations like "English (US, ALL CAPS)".

Return
boolTrue to postprocess strings.

public function didTranslateString($raw_pattern, $translated_pattern, $args, $result_text)
Inherited

PhutilLocale

Callback for post-processing translations.

By default, this callback is not invoked. To activate it, return true from shouldPostProcessTranslations(). Activating this callback incurs a performance penalty.

Parameters
string$raw_patternThe raw input pattern.
string$translated_patternThe selected translation pattern.
list<wild>$argsThe raw input arguments.
string$result_textThe translated string.
Return
stringPost-processed translation string.

public static function loadAllLocales()
Inherited

PhutilLocale

Load all available locales.

Return
map<string, PhutilLocale>Map from codes to locale objects.

public static function loadLocale($locale_code)
Inherited

PhutilLocale

Load a specific locale using a locale code.

Parameters
string$locale_codeLocale code.
Return
PhutilLocaleLocale object.

private static function checkLocaleFallback($map, $locale, $seen)
Inherited

PhutilLocale

Recursively check locale fallbacks for cycles.

Parameters
map<string,$mapPhutilLocale> Map of locales.
PhutilLocale$localeCurrent locale.
map<string,$seenstring> Map of visited locales.
Return
void