Translation using Latte standalone

Wintermute
Member | 13
+
0
-

Hello,

I use Latte alone with my own framework, so without Nette components. I can't figure how to make translation work using the TranslatorExtension extension with my own Translator class. In the example given in the documentation they define a basic MyTranslator class, but the contructor of TranslatorExtension expects an instance of Nette\Localization\Translator, which means that Nette components are needed.

David Grudl
Nette Core | 8218
+
+2
-

TranslatorExtension accept any callable, see https://github.com/…xtension.php#L31

Wintermute
Member | 13
+
0
-

Thankyou !