Class InternationalizedHelper
Responsibility - abstract class to process date, number or money formatting by Intl
extension or by locale formatting conventions.
- Formatting processed by Intl
extension if installed or (automatically) configured system locale settings.
- System locale settings automatically configured by request language and request locale.
- Encoding result string to always return it in response encoding, in UTF-8 by default.
- MvcCore\Ext\Views\Helpers\AbstractHelper implements MvcCore\Ext\Views\Helpers\IHelper
-
MvcCore\Ext\Views\Helpers\InternationalizedHelper
Direct known subclasses
MvcCore\Ext\Views\Helpers\FormatDateHelper, MvcCore\Ext\Views\Helpers\FormatNumberHelperIndirect known subclasses
MvcCore\Ext\Views\Helpers\FormatMoneyHelperNamespace: MvcCore\Ext\Views\Helpers
Located at ext-view-helper-internationalized/src/MvcCore/Ext/Views/Helpers/InternationalizedHelper.php
public
|
#
__construct( )
Create new helper instance, set boolean about |
public
|
#
SetIntlExtensionFormatting( boolean $intlExtensionFormatting = TRUE )
Set |
public
|
#
SetLangAndLocale( string $lang = NULL, string $locale = NULL )
Set language code and locale (territory) code manually. Use this function only if there is no language and locale codes presented in request object. |
public
|
#
SetDefaultEncoding( string $encoding = 'UTF-8' )
Set default encoding if there is no response encoding configured.
Use this function is used only if |
public
|
#
SetDefaultLangAndLocale( string[] $defaultLangAndLocale = ['en', 'US'] )
Set default language and locale used for |
public
|
#
SetView(
Set up view properties and language and locale by request object in every view rendering change. |
protected
|
#
setUpSystemLocaleAndEncodings( )
Try to define system locale and it's system locale conversion information.
This function is used only if |
protected
string
|
GetInstance()
|
public
|
VERSION
|
protected
boolean|null
|
$intlExtensionFormatting
Boolean about if |
#
NULL
|
protected
string|null
|
$lang
Automatically assigned language from controller request object. |
#
NULL
|
protected
string|null
|
$locale
Automatically assigned locale from controller request object. |
#
NULL
|
protected
string|null
|
$langAndLocale
Automatically assigned lang and locale combination from controller request object. |
#
NULL
|
protected
IntlDateFormatter[]|NumberFormatter[]
|
$intlFormatters
Storage with |
#
[]
|
protected
string
|
$defaultEncoding
Default encoding to use if there is no response encoding configured. |
#
'UTF-8'
|
protected
int[]
|
$localeCategories
System |
#
[LC_ALL]
|
protected
boolean|null
|
$encodingConversion
|
#
NULL
|
protected
string|null
|
$systemEncoding
System |
#
NULL
|
protected
string|null
|
$responseEncoding
Target encoding, automatically assigned from application response.
If there is no response encoding, there is set UTF-8 by default.
This variable is automatically resolved in every |
#
NULL
|
protected
string[]
|
$defaultLangAndLocale
Default language and locale used for |
#
['en', 'US']
|
$controller,
$instance,
$request,
$response,
$view
|