8.4.2 page template names not translated in package

Permalink
I make an array of page template names in my package with
$pt->getPageTemplateName()

but they don't get translated. However the same code in the Pages & Themes in Dashboard gets translated. I could add a t() for that, but shouldn't that get translated by default?

linuxoid
 
mlocati replied on at Permalink Reply
mlocati
To have the translated name of a page template, you need to use the `getPageTemplateDisplayName` method, not the `getPageTemplateName` method.
linuxoid replied on at Permalink Reply
linuxoid
Yep, that worked! Thank you.

Would you know why the page name in a page selector is not translated?