Retrieves the localized string for the given key. Note that the key will always have a fixed prefix of "me2k.editor.script.". The key is always lowercase. Please use a naming convention to avoid conflicts with other scripts. E.g. "me2k.editor.script.my_script.". The optional data parameter can be used to replace placeholders in the localized string.
The key of the localized string. Please ensure to exclude the prefix.
Optional
data: { If specified, the localized string will be replaced with the given data. The data object should be a dictionary with the placeholder name as key and the replacement value as value which will be converted to text.
The localized string, optionally formated with the given data.
Performs the replace method on the given format string with the given data. The format has to use "<<" and ">>" as key delimiters.
The format string to replace.
The data object should be a dictionary with the placeholder name as key and the replacement value as value.
The final formatted string.
Generated using TypeDoc
The Loc interface allows to retrieve localized strings for the current storefront.