You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. return [
  3. // string, required, root directory of all source files
  4. 'sourcePath' => __DIR__ . DIRECTORY_SEPARATOR . '..',
  5. // array, required, list of language codes that the extracted messages
  6. // should be translated to. For example, ['zh-CN', 'de'].
  7. 'languages' => ['de'],
  8. // string, the name of the function for translating messages.
  9. // Defaults to 'Yii::t'. This is used as a mark to find the messages to be
  10. // translated. You may use a string for single function name or an array for
  11. // multiple function names.
  12. 'translator' => 'Yii::t',
  13. // boolean, whether to sort messages by keys when merging new messages
  14. // with the existing ones. Defaults to false, which means the new (untranslated)
  15. // messages will be separated from the old (translated) ones.
  16. 'sort' => false,
  17. // boolean, whether to remove messages that no longer appear in the source code.
  18. // Defaults to false, which means each of these messages will be enclosed with a pair of '@@' marks.
  19. 'removeUnused' => false,
  20. // array, list of patterns that specify which files/directories should NOT be processed.
  21. // If empty or not set, all files/directories will be processed.
  22. // A path matches a pattern if it contains the pattern string at its end. For example,
  23. // '/a/b' will match all files and directories ending with '/a/b';
  24. // the '*.svn' will match all files and directories whose name ends with '.svn'.
  25. // and the '.svn' will match all files and directories named exactly '.svn'.
  26. // Note, the '/' characters in a pattern matches both '/' and '\'.
  27. // See helpers/FileHelper::findFiles() description for more details on pattern matching rules.
  28. 'only' => ['*.php'],
  29. // array, list of patterns that specify which files (not directories) should be processed.
  30. // If empty or not set, all files will be processed.
  31. // Please refer to "except" for details about the patterns.
  32. // If a file/directory matches both a pattern in "only" and "except", it will NOT be processed.
  33. 'except' => [
  34. '.svn',
  35. '.git',
  36. '.gitignore',
  37. '.gitkeep',
  38. '.hgignore',
  39. '.hgkeep',
  40. '/messages',
  41. ],
  42. // 'php' output format is for saving messages to php files.
  43. 'format' => 'php',
  44. // Root directory containing message translations.
  45. 'messagePath' => __DIR__,
  46. // boolean, whether the message file should be overwritten with the merged messages
  47. 'overwrite' => true,
  48. /*
  49. // 'db' output format is for saving messages to database.
  50. 'format' => 'db',
  51. // Connection component to use. Optional.
  52. 'db' => 'db',
  53. // Custom source message table. Optional.
  54. // 'sourceMessageTable' => '{{%source_message}}',
  55. // Custom name for translation message table. Optional.
  56. // 'messageTable' => '{{%message}}',
  57. */
  58. /*
  59. // 'po' output format is for saving messages to gettext po files.
  60. 'format' => 'po',
  61. // Root directory containing message translations.
  62. 'messagePath' => __DIR__ . DIRECTORY_SEPARATOR . 'messages',
  63. // Name of the file that will be used for translations.
  64. 'catalog' => 'messages',
  65. // boolean, whether the message file should be overwritten with the merged messages
  66. 'overwrite' => true,
  67. */
  68. ];