how to translat courses content in multiple languages

how to translat courses content in multiple languages

by kiran kiran -
Number of replies: 20

hi,

 i am trying to translat courses content as well as headings in multiple languages  any one can help me, how can i do it ?

 

Can somebody help me out?

Thank you

Best regards,

Kiran Mane

Average of ratings: -
In reply to kiran kiran

Re: how to translat courses content in multiple languages

by Sergiu Popa -

Hello,

The content of the course cannot be translate. You must create a course for each language and inside each one you add the content in the specific language. In the settings page of the course you can set Force language to display the interface in the course's language.

Average of ratings: Useful (1)
In reply to Sergiu Popa

Re: how to translat courses content in multiple languages

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Content can't be automatically translated. However, if you do have it translated then you can explore the Multi-language content filter

Average of ratings: Useful (1)
In reply to Mary Cooch

Re: how to translat courses content in multiple languages

by kiran kiran -

Thank you for the reply, Mary

how can we use Multi-language content filter for heading and content..

In reply to kiran kiran

Re: how to translat courses content in multiple languages

by Robert Brenstein -
You do not use Multiple Language Content filter for translation. That you do outside of Moodle. You use that filter to display your content in multiple languages, having the content following the selection of the interface language. It will work for headers as well as any content as long as the filter is activated and configured to handle all elements not just the standard. That must be done by your site administrator.

In terms of formatting the content so it properly works with the filter, you need to follow the documentation of that filter for your version of Moodle. The link was given above but may be not visible. Here it is again more explicitly:

http://docs.moodle.org/26/en/Multi-language_content_filter
Average of ratings: Useful (2)
In reply to Robert Brenstein

Re: how to translat courses content in multiple languages

by kiran kiran -

hi Robert sir,

how can we use 

<span lang="XX" class="multilang">your_content_here</span>
<span lang="YY" class="multilang">your_content_in_other_language_here</span> 

for headers?

Thank you

Best regards,

Kiran Mane

In reply to kiran kiran

Re: how to translat courses content in multiple languages

by Robert Brenstein -
Exactly that. What do you mean exactly by headers? May be we are not talking about the same thing. Please give a specific location of a header that you want to be multi-lingual.
In reply to Robert Brenstein

Re: how to translat courses content in multiple languages

by kiran kiran -

hi Robert sir,

Now i am trying to create course contents and course title(Page title) in multiple languages

i have enables Multi-language content filter (Site administration->Plugins->Filters->Manage filters=>Multi-Language Content : active:on, Apply to: content and headings).

  than  enable Edit mode ->edit course and added <span class="multilang" lang="en">test text</span><span class="multilang" lang="mr">चाचणी मजकूर</span> in editor then update -> save page ->Preview

but it can not work. i need to display only selected language text (if i select English language i need to display only english language text and hide other language texts).

i hope u understand my problem. plz help me.


Thank you

Best regards,

Kiran Mane

In reply to kiran kiran

Re: how to translat courses content in multiple languages

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi,

You should maybe set the dropdown menu "Apply to" to "Content and headings". See screenshot.

Attachment Content-headings.png
Average of ratings: Useful (1)
In reply to Nicolas Martignoni

Re: how to translat courses content in multiple languages

by kiran kiran -

hi,

 i have set the dropdown menu Apply to = "Content and headings" but it no work .

In reply to kiran kiran

Re: how to translat courses content in multiple languages

by Robert Brenstein -
You say you use the preview function. Isn't that part of the wysiwyg-editor? You need to leave the editor completely and change the languages through language popup menu to test.

Working with multiple language is often problematic using the wysiwyg-editor. That editor has no clue about special multi-lang filter coding. If you do not want to turn it off in your user profile, you should be using the raw-html mode of the editor. Your enter it using the <> button. Save in that mode and just leave the editor to test.
In reply to Robert Brenstein

Re: how to translat courses content in multiple languages

by Robert Brenstein -
I just tested your course title at demo.moodle.net and it works. It works. See attached screen shots. Try it yourself there.

You need to figure out what you are doing wrong. My guess is that the wysiwyg-editor is getting in your way.
Attachment screenshots.jpg
Average of ratings: Useful (1)
In reply to Robert Brenstein

Re: how to translat courses content in multiple languages

by David Pelletier-Proulx -

I'm gave up with the multi-language filter a long time ago but I'm willing to give it another go.

is it possible to use the <span lang='xx' class="multilang">your_content_here</span> around other html element.  for exemple I have this.

<p><span class="multilang" lang="fr">votre contenue ici</span>

<span class="multilang" lang="en">Your context here</span></p>

and it's working like a charm.

but not I have all that in French
<p>Bonjour,</p>
<p>Ceci est un liste d'<strong> HTML Element</strong>:</p>
<ul>
<li>img</li>
<li>formatage du text</li>
<li>tables</li>
</ul>
<p>Parfois nous ajoutons des liens: comme <a href="http://www.objectiflune.com">celui-ci</a></p>
<p>Il pourrai y avoir des images <img src="PrintShopMail-logo-web.png" height="28" width="149" /></p>

and that in English.


<p>Hi,</p>
<p>this is a list of<strong> HTML Element</strong>:</p>
<ul>
<li>img</li>
<li>text formatting</li>
<li>tables</li>
</ul>
<p>Sometime there links like<a href="http://www.objectiflune.com"> this one. </a></p>
<p>As well as picture like that one <img src="https://ollearn.objectiflune.com/draftfile.php/5798/user/draft/892944336/PrintShopMail-logo-web.png" height="28" width="149" /></p>

 If I'm wrapping the <span lan around the whole content in french and another span around the content in English it doen't work.  The HTML editor in Moodle doesn't save it. like it cleaning the span tag, both the opening tag and the closing tag.

 

If I have to wrap the span lang around each indivitual text it's not practical.  I'm a missing something?

 

David P P

Average of ratings: Useful (1)
In reply to David Pelletier-Proulx

Re: how to translat courses content in multiple languages

by Robert Brenstein -
Turn off wysiwyg-editor in your user profile and you will avoid such troubles. As said above, that editor is not meant to work with html-coded multi-lang texts. I have full page multi-column tables inside multi-lang format and they work just fine, but I do all html coding by hand and without wysiwyg-editor.

You should have only 2 span blocks, one for each language and best if there is no space between the end of one span and beginning of the next. Nothing before or after span blocks, either.
In reply to Robert Brenstein

Re: how to translat courses content in multiple languages

by Robert Brenstein -
Here are the screen shots from demo.moodle.net showing your example in action. It works.
Attachment Screen-shots-En-Fr.jpg
In reply to kiran kiran

Re: how to translat courses content in multiple languages

by kiran kiran -

Thank you for the reply....

In reply to kiran kiran

Re: how to translat courses content in multiple languages

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Kiran,

The WYSIWYG editor is problematic. Our course creators need to produce courses in two languages but are not HTML savvy. This is why we switched to the new Multi-lingual content filter. Its non-HTML syntax is so much easier to use and edit.

For example, if you want to specify a string of text in English and French pages, just type the following right in the WYSIWYG editor (no need to go into code view):

{mlang en}English{mlang}{mlang fr}French{mlang}

This syntax is great for single headings and single paragraphs.

For larger blocks, you can do something like the following which is much nicer than having to tag every string in HTML with a span multilang tag:

{mlang en}

Healthy Eating

Healthy eating is fundamental to good overall health.

{mlang}{mlang fr}

Aliments et nutrition

Une saine alimentation est à la base d'une bonne santé.

{mlang}

Tip: The key to making the large blocks work is to keep the joining {mlang}{mlang fr} tags together.

While I've never had a need and hence haven't tried it, if you just want to have text appear in one language and not in the other, I suspect you could do something like:

{mlang en}English Only{mlang}{mlang fr}{mlang}

Notice that I haven't showed any HTML at all yet? For your content creators and editors, this is WAY easier. Once installed and configured, it works everywhere that the core multilang filter does and even some places it doesn't such as fields that don't give you enough room or prevent you from entering HTML.

Give it a try... https://moodle.org/plugins/view.php?plugin=filter_multilangsecond

Let me know if you have any questions.

Best regards,

Michael Milette

Average of ratings: Useful (1)
In reply to Michael Milette

Odp: Re: how to translat courses content in multiple languages

by Andrzej Kulbiński -

Hi all,
I have one question about multilanguage content.
All you are writting here is about one topic with multi language content, but what about multi language courses?
It`s posible to devide courses between participants?

This is the structure of the courses that we have in our eLearning.
But now everyone can see all courses. (The point is to let english-speaking participant to see just english content and Polish articipant to see just Polish content and Czech participant to see just Czech content.) Thank you for your advice.



Attachment moodle-multipage.png
In reply to Andrzej Kulbiński

Re: Odp: Re: how to translat courses content in multiple languages

by Ralf Hilgenstock -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Translators

Hi

you can create a course category  foreach language. Add some flags on teh starting page that like to the category for the language. 

Just on more tip.  You can selct content in courses with conditions that are realted to user profile information. I.e. If user is from France, he can see only content that is for users from France. 

Ralf

Average of ratings: Useful (1)
In reply to Ralf Hilgenstock

Odp: Re: Odp: Re: how to translat courses content in multiple languages

by Andrzej Kulbiński -

Thanks,
I have already course category for each language.

What do you mean " Add some flags on the starting page that like to the category for the language."?

You mean normal national flag? some icons ?

I read about cohorts, and I try it on 2.6.6 but propably it not working properly on this version ?
For any setings what I had everyone has seen everything.

Now I have 2.9 so I`ll try it again.

But it could be cool to set up some language permission on category or cours.

We want to separate any cours for different participant.
From the same starting page - EN - see only EN page, PL, only PL, DE- DE e.t.c.

Everything until now we have setgave the effect that some part was visible with the information - no access to this section.


In reply to kiran kiran

Re: how to translat courses content in multiple languages

by Amina Beny -

If you want translate courses in different languages, and have quality content, i think google translation is not good idea. So each content must translate by human translater.

Average of ratings: Useful (1)