getLocalizedKeys Method
Replace all instances of %{key}
within a string with the translations of those keys.
For example:
"MyKeys": {
"Key1": "First value",
"Key2": "Second value"
}
i18.translateKeys("string with %{MyKeys.Key1} followed by %{MyKeys.Key2}!"") // returns "string with First Value followed by Second Value!"
getLocalizedKeys(line: string): string
@returns The line with all %{keys} translated
Parameter | Type | Description |
---|---|---|
line | string | The input line, potentially containing %{keys}. |
Returns - string
The line with all %{keys} translated
Defined in
- ITwinLocalization.ts Line 115
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.