Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

More doubts (templates translations)

Go to End

2 Posts   1279 Views


Community Member, 21 Posts

26 November 2007 at 3:13pm


you guys must be calling me a pain in the neck already :)

Ok here we go, attempting to translate some templates, i've got some questions regarding templating fallback, they're translations and unecessary files.

I was trying to translate the string 'Displaying X to Y of Z' in the MemberTable, logically i went to the cms, searched the templates, and found in Includes dir.
So i added the <% _t() %> to it, added $lang['en_US']['']['DISPLAYING'] to both files (yes i changed the locale on the pt_PT.php) and no change on the UI.

so, i grep the whole source for the string and found:

to test, i did the same on like i did on and added the $lang.....[''].... to the lang files and it worked.


a) how does the template fallback works with translation
I mean, cms has the template for, shouldn't it use and discard the remaining ones, and translate ofc the strings present in it ?

b) how should we translate template strings on cms that fallback to sapphire templates ? Several cms classes extend sapphire is there a way to keep cms translations independent of sapphire template fallbacks ? (i think this would be the best option,instead of having to translate sapphire in order to have cms translated, since i assume they're 2 different things)

c) Is there really a need to fallback to sapphire templates from cms ?
If cms wants to be a 'module' independent from sapphire (from which it extends) and sapphire the 'framework' shouldn't cms have all templates (even if repeated) so that when working with cms we wouldn't have to fiddle into sapphire to change/fix/add something that is only dependent of cms (not talking about framework functionality)

Just some inocent questions to understand better how ss works and ofc how you guys as core developers think of how it should work.

Best regards,


Forum Moderator, 801 Posts

26 November 2007 at 8:49pm

> a) how does the template fallback works with translation
currently we don't have template-level inheritance. template-naming doesn't necessarily follow conventions (<classname>_<customname>), and we don't know in which context a template is rendered, so determining inheritance is tricky. we're always open for practical solutions (and patches) though

> b) how should we translate template strings on cms that fallback to sapphire templates ?
currently the only solution is to translate them twice, sorry.
in terms of dependencies, you're right to assume that sapphire should work independently of cms, while cms will have sapphire as a base-dependency in the foreseeable future