Substitution tags are used to generate dynamic content across the platform. As enumerations, substitution tags can be defined for each language set for the solution.
On the main screen inside Substitution tags, you have the following elements:
Key
Values - strings that are used in the end-user interface, according to the language set for the generated solution
Edit - button used to edit substitution tags
Delete - button used to delete substitution tags
New value - button used to add a new substitution tag
Breadcrumbs menu:
Import
from JSON
from CSV
Export
to JSON
to CSV
Search by - search function used to easily look for a particular substitution tag
To add a new substitution tag, follow the next steps.
Go to FlowX Designer and select the Content Management tab.
Select Substitution tags from the list.
Click New value.
Fill in the necessary details:
Key
Languages
Click Add after you finish.
When working with substitution tags or other elements that imply values from other languages defined in the CMS, when running a process, the default values extracted will be the ones marked by the default language.
public func getTag(withKey key: String) -> String?
All substitution tags will be retrieved by the SDK before starting the first process and will be stored in memory.Whenever the container app needs a substitution tag value for populating the UI of the custom components, it can request the substitution tag using the method above, providing the key.For example, substitution tags can be used to localize the content inside an application.
You must first check and configure the FLOWX.AI Angular renderer to be able to replicate this example. Click here for more information.
The flxLocalize pipe is found in the FlxLocalizationModule.
Copy
Ask AI
import { FlxLocalizationModule } from 'flowx-process-renderer';
Copy
Ask AI
import { Component } from '@angular/core';@Component({ selector: 'app-dummy-component', template: ` <h3>{{ "stringToLocalize" | flxLocalize}}</h3>`,})export class DummyComponent{ stringToLocalize: string = `@@localizedString`}
Strings that need to be localized must have the ’@@’ prefix which the flxLocalize pipe uses to extract and replace the string with a value found in the substitution tags enumeration.Substitution tags are retrieved when a start process call is first made, and it’s cached on subsequent start process calls.