--:SetVar Function "AUX:TechLocalText"
if exists( select * from [sysobjects] (nolock) where [type] in ('FN','TF') and [name]=N'AUX:TechLocalText' )
   drop function [AUX:TechLocalText]
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:TechLocalText]
(
   @DefaultText      nvarchar(max),
   @InMainLanguage   nvarchar(max) = null
)
returns nvarchar(max)
BEGIN
/*==================================================================================================
# SQLAUX scripting library | Author: Sergei Y.Kitáev
----------------------------------------------------------------------------------------------------
#
# LOCALIZED TEXT, ACCORDING TO TECHNICAL LANGUAGE OF SQLAUX-LIBRARY —
# FOR TECH.ERROR MESSAGES (DEVELOPMENT/MAINTENANCE, SCENARIO OF LOCAL SQL-SERVER USAGE, ETC.):
#
# === Usage: ===
# dbo.[AUX:TechLocalText]( <Default text>, null )
# dbo.[AUX:TechLocalText]( <Default text>, <Text in main language> )
#
==================================================================================================*/
return IIF( dbo.[AUX:TechLanguage]()=21, @InMainLanguage, @DefaultText )
/*================================================================================================*/
END
GO
/*
select dbo.[AUX:TechLocalText]( N'Привет!', null ) 'Greeting'
select dbo.[AUX:TechLocalText]( 'Hello!', N'Привет!' ) 'Greeting'
*/
