Skip to content

B4nan/translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

B4nan\Localization\Translator

Installation

register service via config.neon, and don't forget to set translator to template object

in config.neon:

parameters:
	defaultLang: cs
services:
	translator: B4nan\Localization\Translator(%appDir%/langs, %defaultLang%, @cacheStorage)

in BasePresenter.php:

/** @var \B4nan\Localization\Translator @inject */
public $translator;

protected function startup()
{
	parent::startup();
	$this->translator->setLang($this->user->identity->lang);
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published