Language
extends AbstractStyle
in package
Language A couple of predefined values are defined here, see the websites below for more values.
Tags
Table of Contents
Constants
- DE_CH = 'de-CH'
- DE_CH_ID = 2055
- DE_DE = 'de-DE'
- DE_DE_ID = 1031
- EN_GB = 'en-GB'
- EN_GB_ID = 2057
- EN_US = 'en-US'
- EN_US_ID = 1033
- ES_ES = 'es-ES'
- ES_ES_ID = 3082
- FR_BE = 'fr-BE'
- FR_BE_ID = 2060
- FR_CH = 'fr-CH'
- FR_CH_ID = 4108
- FR_FR = 'fr-FR'
- FR_FR_ID = 1036
- HE_IL = 'he-IL'
- HE_IL_ID = 1037
- HI_IN = 'hi-IN'
- HI_IN_ID = 1081
- IT_CH = 'it-CH'
- IT_CH_ID = 2064
- IT_IT = 'it-IT'
- IT_IT_ID = 1040
- JA_JP = 'ja-JP'
- JA_JP_ID = 1041
- KO_KR = 'ko-KR'
- KO_KR_ID = 1042
- NL_NL = 'nl-NL'
- NL_NL_ID = 1043
- PT_BR = 'pt-BR'
- PT_BR_ID = 1046
- RU_RU = 'ru-RU'
- RU_RU_ID = 1049
- SV_SE = 'sv-SE'
- SV_SE_ID = 1053
- UK_UA = 'uk-UA'
- UK_UA_ID = 1058
- ZH_CN = 'zh-CN'
- ZH_CN_ID = 2052
Properties
- $aliases : array<string|int, mixed>
- Aliases.
- $index : null|int
- Index number in Style collection for named style.
- $styleName : string|null
- Style name.
- $bidirectional : string
- Complex Script Language.
- $eastAsia : string
- East Asian Language.
- $isAuto : bool
- Is this an automatic style? (Used primarily in OpenDocument driver).
- $langId : int
- Language ID, used for RTF document generation.
- $latin : string
- Latin Language.
Methods
- __construct() : mixed
- Constructor.
- getBidirectional() : null|string
- Get the Complex Script Language.
- getChildStyleValue() : mixed
- Return style value of child style object, e.g. `left` from `Indentation` child style of `Paragraph`.
- getEastAsia() : null|string
- Get the East Asian Language.
- getIndex() : null|int
- Get index number.
- getLangId() : int
- Get the Language ID.
- getLatin() : null|string
- Get the Latin Language.
- getStyleName() : string|null
- Get style name.
- isAuto() : bool
- Get is automatic style flag.
- setAuto() : self
- Set is automatic style flag.
- setBidirectional() : self
- Set the Complex Script Language.
- setEastAsia() : self
- Set the East Asian Language.
- setIndex() : self
- Set index number.
- setLangId() : self
- Set the Language ID.
- setLatin() : self
- Set the Latin Language.
- setStyleByArray() : self
- Set style by using associative array.
- setStyleName() : self
- Set style name.
- setStyleValue() : self
- Set style value template method.
- setBoolVal() : bool
- Set bool value.
- setEnumVal() : mixed
- Set enum value.
- setFloatVal() : null|float
- Set float value: Convert string that contains only numeric into float.
- setIntVal() : null|int
- Set integer value: Convert string that contains only numeric into integer.
- setNonEmptyVal() : string
- Set default for null and empty value.
- setNumericVal() : null|float|int
- Set numeric value.
- setObjectVal() : mixed
- Set object value.
- setPairedVal() : self
- Set $property value and set $pairProperty = false when $value = true.
- validateLocale() : string
- Validates that the language passed is in the format xx-xx.
Constants
DE_CH
public
mixed
DE_CH
= 'de-CH'
DE_CH_ID
public
mixed
DE_CH_ID
= 2055
DE_DE
public
mixed
DE_DE
= 'de-DE'
DE_DE_ID
public
mixed
DE_DE_ID
= 1031
EN_GB
public
mixed
EN_GB
= 'en-GB'
EN_GB_ID
public
mixed
EN_GB_ID
= 2057
EN_US
public
mixed
EN_US
= 'en-US'
EN_US_ID
public
mixed
EN_US_ID
= 1033
ES_ES
public
mixed
ES_ES
= 'es-ES'
ES_ES_ID
public
mixed
ES_ES_ID
= 3082
FR_BE
public
mixed
FR_BE
= 'fr-BE'
FR_BE_ID
public
mixed
FR_BE_ID
= 2060
FR_CH
public
mixed
FR_CH
= 'fr-CH'
FR_CH_ID
public
mixed
FR_CH_ID
= 4108
FR_FR
public
mixed
FR_FR
= 'fr-FR'
FR_FR_ID
public
mixed
FR_FR_ID
= 1036
HE_IL
public
mixed
HE_IL
= 'he-IL'
HE_IL_ID
public
mixed
HE_IL_ID
= 1037
HI_IN
public
mixed
HI_IN
= 'hi-IN'
HI_IN_ID
public
mixed
HI_IN_ID
= 1081
IT_CH
public
mixed
IT_CH
= 'it-CH'
IT_CH_ID
public
mixed
IT_CH_ID
= 2064
IT_IT
public
mixed
IT_IT
= 'it-IT'
IT_IT_ID
public
mixed
IT_IT_ID
= 1040
JA_JP
public
mixed
JA_JP
= 'ja-JP'
JA_JP_ID
public
mixed
JA_JP_ID
= 1041
KO_KR
public
mixed
KO_KR
= 'ko-KR'
KO_KR_ID
public
mixed
KO_KR_ID
= 1042
NL_NL
public
mixed
NL_NL
= 'nl-NL'
NL_NL_ID
public
mixed
NL_NL_ID
= 1043
PT_BR
public
mixed
PT_BR
= 'pt-BR'
PT_BR_ID
public
mixed
PT_BR_ID
= 1046
RU_RU
public
mixed
RU_RU
= 'ru-RU'
RU_RU_ID
public
mixed
RU_RU_ID
= 1049
SV_SE
public
mixed
SV_SE
= 'sv-SE'
SV_SE_ID
public
mixed
SV_SE_ID
= 1053
UK_UA
public
mixed
UK_UA
= 'uk-UA'
UK_UA_ID
public
mixed
UK_UA_ID
= 1058
ZH_CN
public
mixed
ZH_CN
= 'zh-CN'
ZH_CN_ID
public
mixed
ZH_CN_ID
= 2052
Properties
$aliases
Aliases.
protected
array<string|int, mixed>
$aliases
= []
$index
Index number in Style collection for named style.
protected
null|int
$index
This number starts from one and defined in Style::setStyleValues()
$styleName
Style name.
protected
string|null
$styleName
$bidirectional
Complex Script Language.
private
string
$bidirectional
$eastAsia
East Asian Language.
private
string
$eastAsia
$isAuto
Is this an automatic style? (Used primarily in OpenDocument driver).
private
bool
$isAuto
= false
Tags
$langId
Language ID, used for RTF document generation.
private
int
$langId
Tags
$latin
Latin Language.
private
string
$latin
Methods
__construct()
Constructor.
public
__construct([null|string $latin = null ][, null|string $eastAsia = null ][, null|string $bidirectional = null ]) : mixed
Parameters
- $latin : null|string = null
- $eastAsia : null|string = null
- $bidirectional : null|string = null
getBidirectional()
Get the Complex Script Language.
public
getBidirectional() : null|string
Return values
null|stringgetChildStyleValue()
Return style value of child style object, e.g. `left` from `Indentation` child style of `Paragraph`.
public
getChildStyleValue(AbstractStyle $substyleObject, string $substyleProperty) : mixed
Parameters
- $substyleObject : AbstractStyle
- $substyleProperty : string
Tags
getEastAsia()
Get the East Asian Language.
public
getEastAsia() : null|string
Return values
null|stringgetIndex()
Get index number.
public
getIndex() : null|int
Return values
null|intgetLangId()
Get the Language ID.
public
getLangId() : int
Return values
intgetLatin()
Get the Latin Language.
public
getLatin() : null|string
Return values
null|stringgetStyleName()
Get style name.
public
getStyleName() : string|null
Return values
string|nullisAuto()
Get is automatic style flag.
public
isAuto() : bool
Return values
boolsetAuto()
Set is automatic style flag.
public
setAuto([bool $value = true ]) : self
Parameters
- $value : bool = true
Return values
selfsetBidirectional()
Set the Complex Script Language.
public
setBidirectional(string $bidirectional) : self
Parameters
- $bidirectional : string
-
The value for the complex script language
Return values
selfsetEastAsia()
Set the East Asian Language.
public
setEastAsia(string $eastAsia) : self
Parameters
- $eastAsia : string
-
The value for the east asian language
Return values
selfsetIndex()
Set index number.
public
setIndex([null|int $value = null ]) : self
Parameters
- $value : null|int = null
Return values
selfsetLangId()
Set the Language ID.
public
setLangId(int $langId) : self
Parameters
- $langId : int
-
The value for the language ID
Tags
Return values
selfsetLatin()
Set the Latin Language.
public
setLatin(string $latin) : self
Parameters
- $latin : string
-
The value for the latin language
Return values
selfsetStyleByArray()
Set style by using associative array.
public
setStyleByArray([array<string|int, mixed> $values = [] ]) : self
Parameters
- $values : array<string|int, mixed> = []
Return values
selfsetStyleName()
Set style name.
public
setStyleName(string $value) : self
Parameters
- $value : string
Return values
selfsetStyleValue()
Set style value template method.
public
setStyleValue(string $key, array<string|int, mixed>|int|string $value) : self
Some child classes have their own specific overrides. Backward compability check for versions < 0.10.0 which use underscore prefix for their private properties. Check if the set method is exists. Throws an exception?
Parameters
- $key : string
- $value : array<string|int, mixed>|int|string
Return values
selfsetBoolVal()
Set bool value.
protected
setBoolVal(bool $value, bool $default) : bool
Parameters
- $value : bool
- $default : bool
Return values
boolsetEnumVal()
Set enum value.
protected
setEnumVal([mixed $value = null ][, array<string|int, mixed> $enum = [] ][, mixed $default = null ]) : mixed
Parameters
- $value : mixed = null
- $enum : array<string|int, mixed> = []
- $default : mixed = null
setFloatVal()
Set float value: Convert string that contains only numeric into float.
protected
setFloatVal(mixed $value[, null|float $default = null ]) : null|float
Parameters
- $value : mixed
- $default : null|float = null
Return values
null|floatsetIntVal()
Set integer value: Convert string that contains only numeric into integer.
protected
setIntVal(null|float|int|string $value[, null|int $default = null ]) : null|int
Parameters
- $value : null|float|int|string
- $default : null|int = null
Return values
null|intsetNonEmptyVal()
Set default for null and empty value.
protected
setNonEmptyVal(string|null $value, string $default) : string
Parameters
- $value : string|null
- $default : string
Return values
stringsetNumericVal()
Set numeric value.
protected
setNumericVal(mixed $value[, null|float|int $default = null ]) : null|float|int
Parameters
- $value : mixed
- $default : null|float|int = null
Return values
null|float|intsetObjectVal()
Set object value.
protected
setObjectVal(mixed $value, string $styleName, mixed &$style) : mixed
Parameters
- $value : mixed
- $styleName : string
- $style : mixed
setPairedVal()
Set $property value and set $pairProperty = false when $value = true.
protected
setPairedVal(bool &$property, bool &$pairProperty, bool $value) : self
Parameters
- $property : bool
- $pairProperty : bool
- $value : bool
Return values
selfvalidateLocale()
Validates that the language passed is in the format xx-xx.
private
validateLocale(string $locale) : string
Parameters
- $locale : string