multilang html-block titleI

multilang html-block titleI

ved Daniel Schimrik -
Antal besvarelser: 7

Hello,

I am working currently on a multilanguage moodlesite with 4 languages. The content and title of content is translated as expected.

If inserting an HTML-block, I can insert multilang content, but no multilang title of this block. The language settings in the title are ignored by Moodle and it shows all titles at once.

Is there any way to also translate the title of HTML-blocks? (I am running Moodle 1.9)


Regards, Daniel

Gennemsnitsbedømmelse: -
I svar til Daniel Schimrik

Re: multilang html-block titleI

ved Gordon Bateson -
Billede af Core developers Billede af Peer reviewers Billede af Plugin developers
I have not tested this, but in the absence of other suggestions, how about the following:
  1. open "blocks/moodleblock.class.php" with a text editor
  2. locate the following line (around line 356 in the "_title_html" function):
    $title .= '<h2>'.$this->title.'</h2>';
  3. change the above line to:
    $title .= '<h2>'.filter_text($this->title).'</h2>';
  4. saved the modified file
hope that helps
Gordon
I svar til Gordon Bateson

Re: multilang html-block titleI

ved Daniel Schimrik -
Hello Gordon,

I tried your solution and it works perfectly! So I posted a message to the bug-tracker about this issue.

@Anthony: I had already activated filter anything in the filter section of Moodle

Regards, Daniel
I svar til Daniel Schimrik

Re: multilang html-block titleI

ved Nicolas Martignoni -
Billede af Core developers Billede af Documentation writers Billede af Particularly helpful Moodlers Billede af Plugin developers Billede af Testers Billede af Translators
Could you point us to the issue number?
I svar til Daniel Schimrik

Re: multilang html-block titleI

ved Anthony Borrow -
Billede af Core developers Billede af Plugin developers Billede af Testers
Daniel - Before modifying the code, try going to the Administration Block and under filter settings there should be an option to filter all strings. Turn that on and see if it does the trick. Peace - Anthony