maximebf / atomik

Micro framework for PHP 5.3+ [UNMAINTAINED]
MIT License
46 stars 18 forks source link

translation shortcut __ don't work :/ #53

Open YopSolo opened 8 years ago

YopSolo commented 8 years ago

$this->_('hello')); work as described in the doc but get Fatal error: Call to undefined function () when using the shortcut ('hello');

adaniello commented 8 years ago

This seems not an Atomik issue, but a not valid PHP version or a missing PHP configuration: _() is a native alias of php function gettext (http://php.net/manual/en/function.gettext.php). Check your locale settings in your environment.

YopSolo commented 8 years ago

The simple underscore function works as intended, I was refering to the double underscore function __() as described in the atomik documentation http://atomikframework.com/docs/translations.html#translating-strings

adaniello commented 8 years ago

Ok, but you reported: "get Fatal error: Call to undefined function _()", with simple underscore. If is this the error message, usually there are two reasons:

  1. user permissions for sessions folder or application file (rare);
  2. misconfiguration for locales (in Atomik for "Translations");