You are here

private static function Phamlp::loadMessages in Sassy 7

* Loads the specified language message file for translation. * Message files are PHP files in the "category/messages" directory and named * "language.php", where category is either haml or sass, and language is the * specified language. * The message file returns an array of (source, translation) pairs; for example: * <pre> * return array( * 'original message 1' => 'translated message 1', * 'original message 2' => 'translated message 2', * ); * </pre> *

Parameters

string message category:

1 call to Phamlp::loadMessages()
Phamlp::translate in phamlp/Phamlp.php
* Translates a message to the specified language. * If the language or the message in the specified language is not defined the * original message is returned. *

File

phamlp/Phamlp.php, line 66

Class

Phamlp
Phamlp class. Static support classes. @package PHamlP

Code

private static function loadMessages($category) {
  $messageFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . $category . DIRECTORY_SEPARATOR . 'messages' . DIRECTORY_SEPARATOR . self::$language . '.php';
  if (file_exists($messageFile)) {
    self::$messages[$category] = (require_once $messageFile);
  }
}