strings.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?php
  2. return array(
  3. /*
  4. |--------------------------------------------------------------------------
  5. | String Inflection
  6. |--------------------------------------------------------------------------
  7. |
  8. | This array contains the singular and plural forms of words. It's used by
  9. | the "singular" and "plural" methods on the Str class to convert a given
  10. | word from singular to plural and vice versa.
  11. |
  12. | This simple array is in constrast to the complicated regular expression
  13. | patterns used by other frameworks. We think you'll enjoy the speed and
  14. | simplicity of this solution.
  15. |
  16. | When adding a word to the array, the key should be the singular form,
  17. | while the array value should be the plural form. We've included an
  18. | example to get you started!
  19. |
  20. */
  21. 'inflection' => array(
  22. 'user' => 'users',
  23. 'person' => 'people',
  24. 'comment' => 'comments',
  25. ),
  26. /*
  27. |--------------------------------------------------------------------------
  28. | ASCII Characters
  29. |--------------------------------------------------------------------------
  30. |
  31. | This array contains foreign characters and their 7-bit ASCII equivalents.
  32. | The array is used by the "ascii" method on the Str class to get strings
  33. | ready for inclusion in a URL slug.
  34. |
  35. | Of course, the "ascii" method may also be used by you for whatever your
  36. | application requires. Feel free to add any characters we missed, and be
  37. | sure to let us know about them!
  38. |
  39. */
  40. 'ascii' => array(
  41. '/æ|ǽ/' => 'ae',
  42. '/œ/' => 'oe',
  43. '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|А/' => 'A',
  44. '/à|á|â|ã|ä|å|ǻ|ā|ă|ą|ǎ|ª|а/' => 'a',
  45. '/Б/' => 'B',
  46. '/б/' => 'b',
  47. '/Ç|Ć|Ĉ|Ċ|Č|Ц/' => 'C',
  48. '/ç|ć|ĉ|ċ|č|ц/' => 'c',
  49. '/Ð|Ď|Đ|Д/' => 'Dj',
  50. '/ð|ď|đ|д/' => 'dj',
  51. '/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Е|Ё|Э/' => 'E',
  52. '/è|é|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',
  83. '/В/' => 'V',
  84. '/в/' => 'v',
  85. '/Ý|Ÿ|Ŷ|Ы/' => 'Y',
  86. '/ý|ÿ|ŷ|ы/' => 'y',
  87. '/Ŵ/' => 'W',
  88. '/ŵ/' => 'w',
  89. '/Ź|Ż|Ž|З/' => 'Z',
  90. '/ź|ż|ž|з/' => 'z',
  91. '/Æ|Ǽ/' => 'AE',
  92. '/ß/'=> 'ss',
  93. '/IJ/' => 'IJ',
  94. '/ij/' => 'ij',
  95. '/Œ/' => 'OE',
  96. '/Ч/' => 'Ch',
  97. '/ч/' => 'ch',
  98. '/Ю/' => 'Ju',
  99. '/ю/' => 'ju',
  100. '/Я/' => 'Ja',
  101. '/я/' => 'ja',
  102. '/Ш/' => 'Sh',
  103. '/ш/' => 'sh',
  104. '/Щ/' => 'Shch',
  105. '/щ/' => 'shch',
  106. '/Ж/' => 'Zh',
  107. '/ж/' => 'zh',
  108. ),
  109. );