Jump to content

Is there a way to make some articles bilingual


Steph40

Recommended Posts

Posted

Is there a way to make some articles bilingual beside putting both language one after the other by using ips multilingual. I would oviously write both myself. 

Posted

I do it on my site. Here's how to copy it.

If you're creating a manual Page in the ACP, then enter some code like this:

{{if member.language()->id === 1 }}English content{{else}}Other content{{endif}}

That works because English is my language with the id 1. If the user uses my other language, the other content is loaded.

If you want to be able to post multilingual content using the editor, then you'll need to make sure that your user group has Can post HTML? set to YES. (Members > Groups > edit > Look under Group Settings tab.) Click the source button on your editor and you can type the above code in.

Alternatively, you could use the following plugin to create custom language strings and then place the string in your page template:

 

 

  • 4 weeks later...
Posted

I just got around to trying making an article bilingual with @Fosters custom string and it does not work in an article but it works fine in a page. I want some articles bilingual for site description and want we offer and use them with @opentype page superblocks for my home page.

Hopefully I am clear enough, if someone has an idea please share it.

Posted
6 minutes ago, Steph40 said:

… and want we offer and use them with @opentype page superblocks for my home page.

I can’t think of a way to do that easily with Pages blocks or article databases. Would require lots of template edits and additional fields. 

It’s probably easier just to separate the content entirely. Per language pages or blocks and then just wrap the entire output with the code Meddysong provided. 

Posted
1 minute ago, opentype said:

I can’t think of a way to do that easily with Pages blocks or article databases. Would require lots of template edits and additional fields. 

It’s probably easier just to separate the content entirely. Per language pages or blocks and then just wrap the entire output with the code Meddysong provided. 

Thank you, heading that way.

Posted

Unfortunately this won’t work with our app! ( not today ? )

There’s a difference in searchable, dynamic  content ( e.g. posts, blog posts , articles) and translatable strings like forum names, Navbar items and such stuff.. but it’s not impossible:D it could be accomplished with some custom coding.. I’ll research this further next week. That’s in fact an interesting usecase for our app or another similar app with more features 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...