02.08.2016 4:20, Ryan Kaldari пишет:
That's correct AFAIK. The current method of using Mustache templates (via
the Mustache engine in core) is to translate the
messages before they are
passed to the Mustache template. For example:
echo $templateParser->processTemplate(
'MyWidget',
array(
'username' => $user->getName(),
'message' => wfMessage( 'message-key' )->text()
)
);
...or if you wanted to override the language...
echo $templateParser->processTemplate(
'MyWidget',
array(
'username' => $user->getName(),
'message' => wfMessage( 'message-key' )->inLanguage( $lang
)->text()
)
);
I think adding a custom Mustache function (or lambda or whatever it's
called) to the core Mustache engine for handling i18n would be a pretty
good idea, personally. It would probably need a pretty thorough security
vetting though.
On Sat, Jul 30, 2016 at 2:56 PM, Vedmaka <god.vedmaka(a)gmail.com> wrote:
Hi, Guys!
I was surprised by discovering that current Mustache engine lacks of i18n
support, is it correct or I am missing something ?
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
--
_____________________________________________________________
Mediawiki & Semantic Mediawiki support:
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to: