multilang html-block titleI

multilang html-block titleI

Daniel Schimrik -
回帖数: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

回复Daniel Schimrik

Re: multilang html-block titleI

Gordon Bateson -
Core developers的头像 Peer reviewers的头像 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
回复Gordon Bateson

Re: multilang html-block titleI

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
回复Daniel Schimrik

Re: multilang html-block titleI

Nicolas Martignoni -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像 Translators的头像
Could you point us to the issue number?
回复Daniel Schimrik

Re: multilang html-block titleI

Anthony Borrow -
Core developers的头像 Plugin developers的头像 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