Reference documentation and code samples for the Google API Common Protos Client class LocalizedMessage.
Provides a localized error message that is safe to return to the user which can be attached to an RPC error.
Generated from protobuf message google.rpc.LocalizedMessage
Namespace
Google \ RpcMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ locale |
string
The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX" |
↳ message |
string
The localized error message in the above locale. |
getLocale
The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
Examples are: "en-US", "fr-CH", "es-MX"
Returns | |
---|---|
Type | Description |
string |
setLocale
The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
Examples are: "en-US", "fr-CH", "es-MX"
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getMessage
The localized error message in the above locale.
Returns | |
---|---|
Type | Description |
string |
setMessage
The localized error message in the above locale.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |