Skip to content

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

  1. Install as developer dependency

    npm install -D @webprovisions-registry/alliance-app-resource-management --registry https://registry.webprovisions.io
  2. 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

PropertyTypeRequiredDefaultDescription
langstringYesLanguage 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

PropertyTypeDescription
languageCodestringCode 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

PropertyTypeDescription
languagesLanguageObject representing a language.

Language

PropertyTypeDescription
codestringThe language code. Example: en, sv.
namestringThe language name.

Query Args

No arguments.