multilang html-block titleI

multilang html-block titleI

por Daniel Schimrik -
Número de respuestas: 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

Promedio de valuaciones (ratings): -
En respuesta a Daniel Schimrik

Re: multilang html-block titleI

por Gordon Bateson -
Imagen de Core developers Imagen de Peer reviewers Imagen de 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
En respuesta a Gordon Bateson

Re: multilang html-block titleI

por 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
En respuesta a Daniel Schimrik

Re: multilang html-block titleI

por Nicolas Martignoni -
Imagen de Core developers Imagen de Documentation writers Imagen de Particularly helpful Moodlers Imagen de Plugin developers Imagen de Testers Imagen de Translators
Could you point us to the issue number?
En respuesta a Daniel Schimrik

Re: multilang html-block titleI

por Anthony Borrow -
Imagen de Core developers Imagen de Plugin developers Imagen de 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