Guest Posted May 7, 2019 Share Posted May 7, 2019 (edited) Hello there. PHP Code in my module $params = array( "SessionType" => "Pay", "TemplateTag" => "En", "Language" => "En", ); How i can add condition if lang in this code to define language and to direct to the necessary template. for example if lang ru $params = array( "SessionType" => "Pay", "TemplateTag" => "Ru", "Language" => "Ru", ); else $params = array( "SessionType" => "Pay", "TemplateTag" => "En", "Language" => "En", ); Thank you all. Edited May 7, 2019 by andrew0808 (see edit history) Link to comment Share on other sites More sharing options...
Rolige Posted May 8, 2019 Share Posted May 8, 2019 Hello: Maybe if (Context::getContext()->language->iso_code == 'iso lang code here') Regards Link to comment Share on other sites More sharing options...
Guest Posted May 8, 2019 Share Posted May 8, 2019 6 hours ago, Rolige said: if (Context::getContext()->language->iso_code == 'iso lang code here') Yes. it works. Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now