getSectionTitle in other Language

Hi everyone,

how could i get the sectionTitle in other language, for the other information i do it always like that …$article->getTitle(‘de_DE’)…$article->getTitle(‘en_US’), but for sectionTitle it does not work???

Thanks in advance.

Regards,
Peter

Hi @pitertennis_paco,

Can you describe where you’re making your modifications? The function you describe should work, but some parts of the system have been optimized for performance.

Regards,
Alec Smecher
Public Knowledge Project Team

I do it in issueToc.tpl

Regards,
Peter

However when i change to german it show me the sectionTitle in german but only in german?

Hi @pitertennis_paco,

Can you post the modification you’ve made? (A patch file would be clearest.)

Regards,
Alec Smecher
Public Knowledge Project Team

That’s what i add in the file issueToc.tpl, i let this "<"out to show the code.

form>
input type=“text” value="{$article->getSectionTitle(‘en_US’)}" name=“sectionTitle”/>
input type=“text” value="{$article->getSectionTitle(‘de_DE’)}" name=“sectionTitleGerman”/>
/form>

Hi @pitertennis_paco,

The section name can only be fetched from the article object in the primary and current languages, for performance purposes. If you want to get this in more languages, you’ll need to fetch the complete section object using the SectionDAO. That’s probably best done in the PHP side of the controller rather than the template.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks for your advice and help.

Regards
Peter