gettext.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. return array(
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Available locales
  6. |--------------------------------------------------------------------------
  7. |
  8. | A array list with available locales to load
  9. |
  10. | Default locale will the first in array list
  11. |
  12. */
  13. 'locales' => ['en_US', 'ko_KR'],
  14. /*
  15. |--------------------------------------------------------------------------
  16. | Directories to scan
  17. |--------------------------------------------------------------------------
  18. |
  19. | Set directories to scan to find gettext strings (starting with __)
  20. |
  21. */
  22. 'directories' => ['app', 'resources'],
  23. /*
  24. |--------------------------------------------------------------------------
  25. | Where the translations are stored
  26. |--------------------------------------------------------------------------
  27. |
  28. | Full path is $storage/xx_XX/LC_MESSAGES/$domain.XX
  29. |
  30. */
  31. 'storage' => 'locale',
  32. /*
  33. |--------------------------------------------------------------------------
  34. | Store files as domain name
  35. |--------------------------------------------------------------------------
  36. |
  37. | Full path is $storage/xx_XX/LC_MESSAGES/$domain.XX
  38. |
  39. */
  40. 'domain' => 'dabory',
  41. /*
  42. |--------------------------------------------------------------------------
  43. | Use PHP native gettext functions
  44. |--------------------------------------------------------------------------
  45. |
  46. | Are faster than open files from PHP. If you have enabled the php-gettext
  47. | module, is recommended to enable.
  48. |
  49. */
  50. 'native' => true,
  51. /*
  52. |--------------------------------------------------------------------------
  53. | Use package gettext methods
  54. |--------------------------------------------------------------------------
  55. |
  56. | Enable gettext methods: __, noop__, n__, p__, d__, dp__, np__, dnp__
  57. |
  58. | Reference: https://github.com/oscarotero/Gettext/blob/master/src/translator_functions.php
  59. |
  60. */
  61. 'functions' => false,
  62. /*
  63. |--------------------------------------------------------------------------
  64. | Preference to load translations from format
  65. |--------------------------------------------------------------------------
  66. |
  67. | Some systems and formats are fatest than others (low RAM or CPU usage)
  68. | Available options are mo, po, php
  69. |
  70. */
  71. 'formats' => ['mo', 'php', 'po'],
  72. );