2

I've got a multi lingual site powered by Transcribe and I've run into one area where I am unable to get both French and English to work. See the code below

{exp:channel:month_links channel="blog" limit="50"}
    <li><a href="{exp:transcribe:uri path="events/archives"}" {if {month} == segment_4}class="current"{/if} >{month}, {year}</a></li>
{/exp:channel:month_links}

I need the {month} variable to be in French on the french side and English on the English side. However since this is being pulled directly from EE itself I'm not sure how to achieve this.

2

Since you're evaluating a string, the arguments should be enclosed in quotes (").

{if "{month}" == "{segment_4}"}class="current"{/if}

You may need to add a OR operator for a second condition to check.

Update

Just realized I misunderstood your question. I found this Multi Language Module that allows you to define phrases for each language

Update #2

Since you're using the transcribe module, I would just create variables for each month (ie. month_01) and pass it through the translate tag pair:

{exp:transcribe:translate name="month_{month_num}"}January{/exp:transcribe:translate}
| improve this answer | |
  • The code works fine, but what I can't do is change languages so that on the french site it's displaying April as avril – CreateSean Nov 8 '13 at 19:26
  • Updated my answer for you – Siebird Nov 8 '13 at 19:46
  • Siebird, Transcribe, which I'm using for multi language does that. However because {month} is an EE variable it's not possible to change the translation as far as I am able to determine. – CreateSean Nov 8 '13 at 21:54
  • Updated. A little work on the backend, but I don't think there is any other way of doing this without conditionals on the front end – Siebird Nov 9 '13 at 18:53

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.