Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

GetResourceString

Use this function to retrieve resource strings from a resource bundle residing on the Longview Data Server. The resource bundle must be loaded into memory before using this token.

You may find this function useful when creating Longview Apps that need to be supported for multiple languages.

The language and culture of the operating system (OS), along with the name of the resource bundle determines how the resource key lookup is performed. The names of resource bundles can be one of the following formats:

Order of lookup

Name of resource

Example

1

resourceBundle.Language-Culture.extension

Strings.en-CA.lvres

2

resourceBundle.Language.extension

Strings.en.lvres

3

resourceBundle.extension

Strings.lvres

For example, for an OS that is en-CA (English language, Canada culture), the look up will occur in the following files in the following order:

  • Strings.en-CA.lvres
  • Strings.en.lvres
  • Strings.lvres

By organizing resources properly, you can develop Longview Apps that will support multiple languages.

Copy

Syntax

GetResourceString("resourceBundle", "resourceKey")        

where:

  • resourceBundle is the name of the resource bundle.
  • resourceKey is the name of the resource key.

Sample format of resource file

Copy

Syntax example

CREATE VARIABLE sMsg AS STRING
SET VARIABLE sMsg = GetResourceString("Messages", "Greeting")
SHOW MESSAGE "$sMsg$"        

Published:

GetResourceString

Use this function to retrieve resource strings from a resource bundle residing on the Longview Data Server. The resource bundle must be loaded into memory before using this token.

You may find this function useful when creating Longview Apps that need to be supported for multiple languages.

The language and culture of the operating system (OS), along with the name of the resource bundle determines how the resource key lookup is performed. The names of resource bundles can be one of the following formats:

Order of lookup

Name of resource

Example

1

resourceBundle.Language-Culture.extension

Strings.en-CA.lvres

2

resourceBundle.Language.extension

Strings.en.lvres

3

resourceBundle.extension

Strings.lvres

For example, for an OS that is en-CA (English language, Canada culture), the look up will occur in the following files in the following order:

  • Strings.en-CA.lvres
  • Strings.en.lvres
  • Strings.lvres

By organizing resources properly, you can develop Longview Apps that will support multiple languages.

Copy

Syntax

GetResourceString("resourceBundle", "resourceKey")        

where:

  • resourceBundle is the name of the resource bundle.
  • resourceKey is the name of the resource key.

Sample format of resource file

Copy

Syntax example

CREATE VARIABLE sMsg AS STRING
SET VARIABLE sMsg = GetResourceString("Messages", "Greeting")
SHOW MESSAGE "$sMsg$"        

For an optimal Community experience, Please view on Desktop