Skip to content

keevitaja/translations-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic translations for PyroCMS V3

This module provides fast dynamic translations with the help of Laravel Translator.

Translation items are stored in the database, but are loaded once at the boot level. Just a few extra queries and thats it.

Installation

composer require keevitaja/translations-module dev-master

Next in PyroCMS control panel (admin section) navigate to addons/modules and install the module.

Now you should have Translations menu item.

Usage

To start using the module, you must first create a new Bundle. It is like a translations group. Next create a new Translatable. Each Translatable must have a Bundle.

Bundles Translatables

In your twig templates you can use the trans twig method:

{{ trans('pages.test', {'name': 'Britney Spears'}) }}

In the example above pages is the bundle slug and test is the translatable slug.

For backend usage see Laravels docs:

https://laravel.com/docs/master/localization

What else?

Pyro rocks!

About

Dynamic translations module for Pyrocms V3

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages