Documentation

LocalizedText extends Message
in package

Localized variant of a text in a particular language.

Generated from protobuf message google.type.LocalizedText

Table of Contents

Properties

$language_code  : mixed
The text's BCP-47 language code, such as "en-US" or "sr-Latn".
$text  : mixed
Localized string in the language corresponding to `language_code' below.

Methods

__construct()  : mixed
Constructor.
getLanguageCode()  : string
The text's BCP-47 language code, such as "en-US" or "sr-Latn".
getText()  : string
Localized string in the language corresponding to `language_code' below.
setLanguageCode()  : $this
The text's BCP-47 language code, such as "en-US" or "sr-Latn".
setText()  : $this
Localized string in the language corresponding to `language_code' below.

Properties

$language_code

The text's BCP-47 language code, such as "en-US" or "sr-Latn".

protected mixed $language_code = ''

For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.

Generated from protobuf field string language_code = 2 [json_name = "languageCode"];

$text

Localized string in the language corresponding to `language_code' below.

protected mixed $text = ''

Generated from protobuf field string text = 1 [json_name = "text"];

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $data = NULL ]) : mixed
Parameters
$data : array<string|int, mixed> = NULL

{ Optional. Data for populating the Message object.

@type string $text
      Localized string in the language corresponding to `language_code' below.
@type string $language_code
      The text's BCP-47 language code, such as "en-US" or "sr-Latn".
      For more information, see
      http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.

}

getLanguageCode()

The text's BCP-47 language code, such as "en-US" or "sr-Latn".

public getLanguageCode() : string

For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.

Generated from protobuf field string language_code = 2 [json_name = "languageCode"];

Return values
string

getText()

Localized string in the language corresponding to `language_code' below.

public getText() : string

Generated from protobuf field string text = 1 [json_name = "text"];

Return values
string

setLanguageCode()

The text's BCP-47 language code, such as "en-US" or "sr-Latn".

public setLanguageCode(string $var) : $this

For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.

Generated from protobuf field string language_code = 2 [json_name = "languageCode"];

Parameters
$var : string
Return values
$this

setText()

Localized string in the language corresponding to `language_code' below.

public setText(string $var) : $this

Generated from protobuf field string text = 1 [json_name = "text"];

Parameters
$var : string
Return values
$this

        
On this page

Search results