# Google API Common Protos Client - Class LocalizedText (4.14.0)

4.14.0 (latest) 4.13.0 4.12.5 4.11.0 4.10.0 4.9.0 4.8.3 Reference documentation and code samples for the Google API Common Protos Client class LocalizedText.

Localized variant of a text in a particular language.

Generated from protobuf message `google.type.LocalizedText`

## Namespace

Google \\ Type

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ text` | `string` Localized string in the language corresponding to [language_code](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.LocalizedText#_Google_Type_LocalizedText__getLanguageCode__) below. |
| `↳ language_code` | `string` 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>. |

### getText

Localized string in the language corresponding to
[language_code](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.LocalizedText#_Google_Type_LocalizedText__getLanguageCode__) below.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setText

Localized string in the language corresponding to
[language_code](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.LocalizedText#_Google_Type_LocalizedText__getLanguageCode__) below.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLanguageCode

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>.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setLanguageCode

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>.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |