-
December 3, 2017, 01:19 PM
#1
Master
HOW TO - Dont show Description field "Multilanguage issue"
We give our customers the option to post their listings in multilanguage
we build a system that most fields are selection, so the customer has to know only one language
after filling out the form the listing is showing otomaticly in 11 languages.
BUT the description field. not always are our form functions enough or the customer wants to put a personal note to the listing.
so the description field works like this .. if you dont fill out some languages it will replace the content with an other language. so you get the situation
english has spanish or spanish has arabic
for us this looks really unprofessional - we wrote a ticket but this is standart and the answer was better the visitor can google selftranslate.
i came up with a simple solution.
SOLUTION - in field_out.tpl
@top
{assign var='mypagelang ' value='|'|cat:$smarty.const.RL_LANG_CODE|lower|cat :'|'}
{assign var='myitemsource' value=$item.source.0}
{if $item.Key == 'description_add' && !$myitemsource|strstr:$mypagelang }{else}
@bottom
{/if}
i have no idea is there a better solution BUT it is working for me