PageRenderTime 52ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/yii/framework/i18n/gettext/CGettextFile.php

https://bitbucket.org/aleksame/zurmo
PHP | 35 lines | 6 code | 1 blank | 28 comment | 0 complexity | cbb17a62ba74f1afc916d83f73cf3e80 MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, BSD-3-Clause, LGPL-3.0, LGPL-2.1, BSD-2-Clause
  1. <?php
  2. /**
  3. * CGettextFile class file.
  4. *
  5. * @author Qiang Xue <qiang.xue@gmail.com>
  6. * @link http://www.yiiframework.com/
  7. * @copyright Copyright &copy; 2008-2011 Yii Software LLC
  8. * @license http://www.yiiframework.com/license/
  9. */
  10. /**
  11. * CGettextFile is the base class for representing a Gettext message file.
  12. *
  13. * @author Qiang Xue <qiang.xue@gmail.com>
  14. * @package system.i18n.gettext
  15. * @since 1.0
  16. */
  17. abstract class CGettextFile extends CComponent
  18. {
  19. /**
  20. * Loads messages from a file.
  21. * @param string $file file path
  22. * @param string $context message context
  23. * @return array message translations (source message => translated message)
  24. */
  25. abstract public function load($file,$context);
  26. /**
  27. * Saves messages to a file.
  28. * @param string $file file path
  29. * @param array $messages message translations (message id => translated message).
  30. * Note if the message has a context, the message id must be prefixed with
  31. * the context with chr(4) as the separator.
  32. */
  33. abstract public function save($file,$messages);
  34. }