Skip to content
This repository has been archived by the owner on Feb 27, 2020. It is now read-only.

Auto i18n is a module for Kohana 3, that will automatically collect internationalization strings and save them to /application/i18n/{I18n::$lang}.php files whenever it can't find one.

License

Notifications You must be signed in to change notification settings

jsynowiec/kohana-module-auto-i18n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto i18n

Auto i18n is a module for Kohana 3, that will automatically collect internationalization strings and save them to /application/i18n/{I18n::$lang}.php file whenever it can't find one.

Whenever you'll call __ function, i18n will "get" a translated value from language file. If it can't find a requested value, such value is cached and a default one is returned (like original i18n).

When script processing is complete, I18n::write() method writes all missing values into a language files.

Configuration

Just clone/copy files to /modules/auto-i18n and enable module by adding:

'auto-i18n' => MODPATH.'auto-i18n', // Automatic i18n file generation

to Kohana::modules in your bootstrap.

Remember to move all i18n calls in your bootstrap below module registration.

This module isn't meant to be used in production enviroment. Use it in development stage to prepare all needed translations and then turn it off by commenting it in Kohana::modules or by setting auto-i18n.active to false.

Credits

This module is based on code posted by Mikito Takada.

License

Released under the MIT license.

About

Auto i18n is a module for Kohana 3, that will automatically collect internationalization strings and save them to /application/i18n/{I18n::$lang}.php files whenever it can't find one.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages