Hi all !
Just a question about the new Smarty translate_dec function : Does it completely replace l10n_dec() (which would then be deprecated) or be in addition of the existing function?
Offline
http://piwigo.org/dev/browser/trunk/inc … .php#L1193
:-)
Personnally I would remove l10n and l10n_dec from the adapter in 2.7
Offline
Ok, I missed that :-/
But I noticed that there are still a lot of call to l10n_dec in Piwigo 2.6 core files (i.e : ../admin/comments.php). I use the same code in my plugins and I don't know how to use translate_dec to be fully compliant. Like this :
array_push( $page['infos'], l10n_dec( '%d user deleted', '%d users deleted', count($collection) ) );
Calling translate_dec in tpl files is OK but not in php files. Where am I wrong ?
Offline
well nowhere....
l10n_dec is the main function declared in functions.inc.php and translate_dec is the subsequenty Smarty modifier (it uses l10n_dec internally)
the l10n_dec which was replaced is the one in the Pwg adapter exposed in the template
Offline
main function http://piwigo.org/dev/browser/trunk/inc … c.php#L996
Smarty modifier http://piwigo.org/dev/browser/trunk/inc … s.php#L632
old Pwg Adapter http://piwigo.org/dev/browser/trunk/inc … .php#L1203
Offline
Understood, thanks ! :-)
Offline