--:SetVar Function "AUX:LocalizedText"
if exists( select * from [sysobjects] (nolock) where [type] in ('FN','TF') and [name]=N'AUX:LocalizedText' )
   drop function [AUX:LocalizedText]
GO
/* Translated by $SQLTRANS utility (SQL-file technology). Method author: Sergei Y.Kitáev.
** Script translation date-time: 2022-11-27 00:29:27.24 (stamp of SQL-file generation). */
create function [AUX:LocalizedText]
(
   @DefaultText      nvarchar(max),
   @InMainLanguage   nvarchar(max) = null
)
returns nvarchar(max)
BEGIN
/*==================================================================================================
# SQLAUX scripting library | Author: Sergei Y.Kitáev
----------------------------------------------------------------------------------------------------
#
# LOCALIZED TEXT (ONE OF TWO VARIANTS):
#
# === Usage: ===
# dbo.[AUX:LocalizedText]( <Default text>, null )
# dbo.[AUX:LocalizedText]( <Default text>, <Text in main language> )
#
==================================================================================================*/
return dbo.[AUX:LocalizedText.X2]( @DefaultText, @InMainLanguage, null, null )
/*================================================================================================*/
END
GO
/*
select dbo.[AUX:LocalizedText]( N'Привет!', null ) 'Greeting'
select dbo.[AUX:LocalizedText]( 'Hello!', N'Привет!' ) 'Greeting'
*/
