allow lang ezc function get more than one parameter
This commit is contained in:
parent
0fd680b496
commit
9602c28d96
|
@ -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)
|
||||
{
|
||||
if( i.params.size() > 1 )
|
||||
{
|
||||
std::wstring key;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue