allow lang ezc function get more than one parameter

This commit is contained in:
Tomasz Sowa 2022-05-11 14:22:46 +02:00
parent 0fd680b496
commit 9602c28d96
1 changed files with 21 additions and 4 deletions

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2008-2021, Tomasz Sowa
* Copyright (c) 2008-2022, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -396,10 +396,27 @@ void winix_frame_is(Info & i)
void lang(Info & i)
{
i.res = !i.par.empty();
if( i.params.size() > 1 )
{
std::wstring key;
if( i.res )
i.out << locale.Get(i.par);
for(Ezc::Var & var : i.params)
{
key += var.str;
}
i.res = !key.empty();
if( i.res )
i.out << locale.Get(key);
}
else
{
i.res = !i.par.empty();
if( i.res )
i.out << locale.Get(i.par);
}
}