changing text language

changing text language

ved Robert Brenstein -
Antal besvarelser: 3
Is it possible, and if yes, how, to have the descriptions and instructions that I enter as administrator to change when user changes the language?

Very specifically, I am using pop3 authentication. The configuration panel for it includes a text block with info for users. Great except that I need to have this text in multiple languages not just the one I entered in the web interface. I want people using English, see it in English, and people using German, see it in German.
Gennemsnitsbedømmelse: -
I svar til Robert Brenstein

Re: changing text language

ved Martin Dougiamas -
Billede af Core developers Billede af Documentation writers Billede af Moodle HQ Billede af Particularly helpful Moodlers Billede af Plugin developers Billede af Testers
Sure.  Enable the multilang filter in Admin >> Config >> Filters.

Then type your text like this:

<span lang="en">English stuff here</span>
<span lang="de">Deutsche stuff here</span>

The <span> syntax is new in 1.5.   Earlier versions used this tag instead, but it caused some problems in the editor:

<lang lang="en">English stuff here</lang>
<lang lang="de">Deutsche stuff here</lang>
I svar til Martin Dougiamas

Re: changing text language

ved Robert Brenstein -
I am using 1.4.4 so I need to take a risk with the lang tag. Is there a way to specify default? I mean a text to display when a given language version is not provided?

<lang lang="fr">French stuff here</lang>
<lang lang="de">Deutsche stuff here</lang>
<lang lang="pl">Polish stuff here</lang>
<lang lang="">English stuff here, for any other language</lang>
I svar til Robert Brenstein

Re: changing text language

ved Martin Dougiamas -
Billede af Core developers Billede af Documentation writers Billede af Moodle HQ Billede af Particularly helpful Moodlers Billede af Plugin developers Billede af Testers
The logic is like this:

  1. If your chosen language is found in the mulittext, then that is used.
  2. If the parent language of your chosen language is found, then that is used.
  3. If English (en) is found in the multitext, then that is used.