![]() |
Using Variable for $lng in Template
Hello,
I want to pass a value from PHP to a template to reference a $Lng variable like: $var = 'eml_some_lang_text' in template to display something like {$lng.$var} I know this is incorrect but does anyone know how I might achieve this? Thanks |
Re: Using Variable for $lng in Template
Bump
|
Re: Using Variable for $lng in Template
Would you like to define a text label in your language (Administration area) then use this label in your templates?
|
Re: Using Variable for $lng in Template
I'm a little surprised that your approach doesn't work given the cleanup of language substitution in 4.1.x. Double check that eml_some_lang_text is defined in the language the store is set to.
An alternative to your approach is to get the language variable in the PHP code and pass the text to the template: $langtext = func_get_langvar_by_name("eml_some_lang_text") |
Re: Using Variable for $lng in Template
That actually makes the most sense.
Thanks |
All times are GMT -8. The time now is 12:28 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.