# 6 reasons for contributte/translation package

  1. Tiniest implementation to Nette Framework, thats include only 10 services (9 in production mode)
  2. No unnecessary dependencies
  3. Uses strict types and scalar and return type hints
  4. Tests coverage hitting 100%
  5. Ready for Symfony 5
  6. For implementation you need only 9 lines of code

Install dependencies:

composer require contributte/translation
1

File app/config/contributte.neon:

extensions:
	translation: Contributte\Translation\DI\TranslationExtension

translation:
locales:
	default: en
	dirs:
		- %appDir%/lang
1
2
3
4
5
6
7
8

File app/lang/messages.en_US.neon:

helloWorld: "Hello world"
1

Some latte template:

latte: {_helloWorld}
1