Jump to content

Can't find the right variable to determine the current language


Recommended Posts

Hello :)

I would be glad to get your help.

Problem: in product-images-modal.tpl I'd like a text appearing under the product image, depending on the language in which the browser (shop) is instantly shown.

To do so, I changed the "original standard" block:

{block name='product_description_short'}
            <div id="product-description-short" itemprop="description">{$product.description_short nofilter}</div>
          {/block}

into my own (example):

{block name='product_description_short'}
{if $current_language.iso_code == 'de'} {$good}
            {else} {$bad}
            {/if}
{/block}

where id_lang or iso_code = German.

in the header, the two variables and their values have been assigned. No matter the language code is as shown, or (p.ex.) $current_language.id_lang == '1' the result is always the same. It is ignored and the "else" value is given.

So I think that the "if" request is correct. But I don't have the right variable to determine the instantly used language?

Thanks in advance for any help! :)

 

Jean G.

PS. my block is standing alone in an "override" theme...

Edited by Jean Gangolf
correections... (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...