ftos.utils.getLocalizedString

IMPORTANT!  
Starting with v24.3.0, this is renamed from getString to ftos.utils.getLocalizedString.

Returns a composite format string stored in a resource object corresponding to the current system language. Replaces any indexed placeholders in the returned string with arguments from a specified array.

This is a method suitable for all business service components.

Syntax

function ftos.utils.getLocalizedString(resource: any, arguments: any[]): string
 
Parameter Description
resource Resource object. Has the following structure:
{
	key : <Key Name>,
	<locale 1>: <String 1>,
	<locale 1>: <String 2>,
	...					
}
The key entry is mandatory, although not used by the ftos.utils.getLocalizedString function.
Strings may contain indexed placeholders based on the .NET format item syntax {index[,alignment][:formatString]}. For example: {0}, {1:d}, {0:hh}, {1:E}, {1,5:N1}.
arguments Array of replacement values for the placeholders in the resource string.

Return Value

Returns the string matching the current system language, with replacement values in place of any indexed placeholders.

Examples