0

I'm using Transcribe 1.6.2 with EE 2.10.3.

Our site is in both English and French, and due to differences, I need to adjust some of the template code slightly depending on the current language.

I'm trying to validate based on {exp:transcribe:language_abbreviation}, whether it's "en" or "fr".

{if '{exp:transcribe:language_abbreviation}' == "en"}
    {exp:low_replace find="\<li\>|\<\/li\>" replace="<li><div class=QUOTEc_rotator-contentQUOTE><h1 class=QUOTEv_whiteQUOTE>|</h1></div></li>" regex="yes" multiple="yes"}
{if:elseif '{exp:transcribe:language_abbreviation}' == "fr"}
    {exp:low_replace find="\<li\>|\<\/li\>" replace="<li><div class=QUOTEc_rotator-contentQUOTE><h1 class=QUOTEv_white v_h2QUOTE>|</h1></div></li>" regex="yes" multiple="yes"}
{/if}

    {cf_static_headline}
{/exp:low_replace}

Basically, if it's French, throw in an extra style class on the h1 tag that will change the font size because with the current styling, in French it takes up too much space.

I've also tried using preload text replacements, with no success. In either case, it only takes what the first statement is.

The same if statement works fine for another bit of code that I've used it for (changing the way the date is displayed), but I don't understand why it's not working for this.

Thanks.

2

Thanks to Tom at EEHarbour, my problem has been solved.

I didn't realize that there was any difference at all between the two tags {exp:transcribe:language_abbreviation} and {transcribe:language_abbreviation} and it seems like using the second is the way to go in this case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.