Resource Management
The Resource Management app is used to translate resource texts used by all apps within the Telia ACE platform.
WARNING
For this app to function, it requires the Alliance Data backend.
Please note that this backend is exclusively accessible to developers from team Alliance.
How to install
Install as developer dependency
npm install -D @webprovisions-registry/alliance-app-resource-management --registry https://registry.webprovisions.io
Add app to your Alliance configuration file.
ts// alliance.config.ts import { defineConfig } from '@telia-ace/alliance-framework/config'; export default defineConfig({ server: { apps: ['@webprovisions-registry/alliance-app-resource-management'], }, });
Capabilities
changeLanguage
Changes the language based on the key passed as an argument. The preferred language is then stored as a functional cookie.
Example
ts
// app.ts
import { runCapability } from '@telia-ace/alliance-framework';
runCapability('resource-management', 'changeLanguage', { lang: 'en' });
Args
Property | Type | Required | Default | Description |
---|---|---|---|---|
lang | string | Yes | Language code. |
Result
No returned result.
Managed Objects
currentLanguage
The language currently selected by the user.
Example
ts
// app.ts
import { queryObjects } from '@telia-ace/alliance-framework';
const query = queryObjects('currentLanguage');
const { languageCode } = await query.resolve();
Object Type
Property | Type | Description |
---|---|---|
languageCode | string | Code for the selected language. Example: en , sv . |
Query Args
No arguments.
availableLanguages
The language currently available in the platform.
Example
ts
// app.ts
import { queryObjects } from '@telia-ace/alliance-framework';
const query = queryObjects('availableLanguages');
const { languages } = await query.resolve();
Object Type
Property | Type | Description |
---|---|---|
languages | Language | Object representing a language. |
Language
Property | Type | Description |
---|---|---|
code | string | The language code. Example: en , sv . |
name | string | The language name. |
Query Args
No arguments.