We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

[solved] LG Multi Language and Single Entry Templates

Development and Programming

Eric Barstad's avatar
Eric Barstad
198 posts
17 years ago
Eric Barstad's avatar Eric Barstad

Does anyone here know how to get LG Multi Language to work with single entry templates that rely on the URL to display content? For example, I have a News article template with the following code:

{exp:weblog:entries weblog="news"}

{if lg_lang == 'fr'}
  <h2>Faits saillants</h2>
  <h3>{news_title_fr}</h3>
  {news_body_fr}
{if:else}
  <h2>News</h2>
  <h3>{title}</h3>
  {news_body}
{/if}

{/exp:weblog:entries}

If I go to www.example.com/news/article/article-title/, the single English article will display. If I go to www.example.com/news/article/article-title/fr/ all the news articles are displayed. How do I get around this?

       
Eric Barstad's avatar
Eric Barstad
198 posts
17 years ago
Eric Barstad's avatar Eric Barstad

Added

url_title="{segment_3}"

and that seems to have done the trick.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.