Hello, i missed some good futures in processwire so i decided to write my own module to do it.
In Github:
https://github.com/GomatoX/Language-Constants/
Installation is the same as other modules installation. Language constant module creates language_constants table in database.
Purpose:
This module helps to keep texts editable in cms, not hardcoded.
For example, I want to have editable back button text: "back to main", so I just need to add it into language constants modulue as a constant and it would be reachable everywhere in page.
How to use:
Simply use $lang class and it's method display, example:
$lang->display( 'constant_name' );
display( string $constant_name )
returns language constant variable.
Known issues ( todo in future ):
There is no available support if multilanguage is installed.
No cache for constants.
Needs optimization.
*Still in beta conditions, posted for tests.