Localization
Some wazo-platform features sometimes need to rely on geographic context.
For example,
- handling ambiguity when interpreting locale-dependent information such as phone numbers, and normalizing such information before further processing or storage;
- providing locale-aware presentation of information such as phone numbers;
- enabling wazo-platform client applications to provide locale-aware user interfaces.
For such purposes and others, the wazo-confd API /localization
allows setting and reading a
per-tenant geographic context, which is also exposed as a read-only attribute country
of
/users
resources.
To set the geographic context for a tenant(wazo-confd API reference):
curl -XPUT -H "Content-Type: application/json" -H "X-Auth-Token: $token" -H "Wazo-Tenant: $tenant_uuid" https://<stack hostname>/api/confd/1.1/localization -d '{"country": "FR"}'
To read the geographic context of a tenant(wazo-confd API reference):
curl -XGET -H "X-Auth-Token: $token" -H "Wazo-Tenant: $tenant_uuid" https://<stack hostname>/api/confd/1.1/localization
(where $token
is an authentication token and
$tenant_uuid
is the UUID of the tenant)
The purpose of such geographic context information is not limited to a particular use case, and is meant to enable both present and future use cases.
Current use cases relying on the information from this API include: