Skip to content

Partially localized text is used in the StrTemplate function (MultilingualStringUsingWithTemplate)

Type Scope Severity Activated
by default
Minutes
to fix
Tags
Error BSL Major Yes 2 error
localize

Parameters

Name Type Description Default value
declaredLanguages String Declared languages ru

Description

NStr in a multilingual configuration has different fragments for different languages. If you start a session under a language code that is not in the string passed to NStr, it will return an empty string. When used with StrTemplate, an empty string returned from NStr will throw an exception.

Sources

Snippets

Diagnostic ignorance in code

// BSLLS:MultilingualStringUsingWithTemplate-off
// BSLLS:MultilingualStringUsingWithTemplate-on

Parameter for config

"MultilingualStringUsingWithTemplate": {
    "declaredLanguages": "ru"
}