Smarty selection and localization

I am trying to implement picklists using Smarty, and I know {html_options} . The application must support localization (which I performed as described in this post ).

Is it possible to combine the two?

I am currently processing it, parsing elements with {section name=i loop=$list}and manually, generating HTML code (processing translation with {eval}). I do not like the solution, but so far I have not been able to find a better way.

Many, many thanks!

+3
source share
1 answer

Write a custom Smarty plugin that calls an existing translation code.

modifier, , ,

{$myvar|translate}

,

{translate}This text{/translate}
+2

Source: https://habr.com/ru/post/1714870/


All Articles