|
| 1 | +<?php |
| 2 | + |
| 3 | +return array( |
| 4 | + |
| 5 | + /* |
| 6 | + |-------------------------------------------------------------------------- |
| 7 | + | Folders where to search for lemmas |
| 8 | + |-------------------------------------------------------------------------- |
| 9 | + | |
| 10 | + | Localization::Missing will search recursively for lemmas in all php files |
| 11 | + | included in these folders. You can use these keywords : |
| 12 | + | - %APP : the laravel app folder of your project |
| 13 | + | - %BASE : the laravel base folder of your project |
| 14 | + | - %PUBLIC : the laravel public folder of your project |
| 15 | + | - %STORAGE : the laravel storage folder of your project |
| 16 | + | No error or exception is thrown when a folder does not exist. |
| 17 | + | |
| 18 | + */ |
| 19 | + 'folders' => array( |
| 20 | + '%BASE/resources/views', |
| 21 | + '%APP/Http/Controllers', |
| 22 | + ), |
| 23 | + |
| 24 | + |
| 25 | + /* |
| 26 | + |-------------------------------------------------------------------------- |
| 27 | + | Lang file to ignore |
| 28 | + |-------------------------------------------------------------------------- |
| 29 | + | |
| 30 | + | These lang files will not be written |
| 31 | + | |
| 32 | + */ |
| 33 | + 'ignore_lang_files' => array( |
| 34 | + 'validation', |
| 35 | + ), |
| 36 | + |
| 37 | + |
| 38 | + /* |
| 39 | + |-------------------------------------------------------------------------- |
| 40 | + | Lang folder |
| 41 | + |-------------------------------------------------------------------------- |
| 42 | + | |
| 43 | + | You can overwrite where is located your lang folder |
| 44 | + | If null or missing, Localization::Missing will search : |
| 45 | + | - first in app_path() . DIRECTORY_SEPARATOR . 'lang', |
| 46 | + | - then in app_path() . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'lang', |
| 47 | + | |
| 48 | + */ |
| 49 | + 'lang_folder_path' => null, |
| 50 | + |
| 51 | + |
| 52 | + /* |
| 53 | + |-------------------------------------------------------------------------- |
| 54 | + | Methods or functions to search for |
| 55 | + |-------------------------------------------------------------------------- |
| 56 | + | |
| 57 | + | Localization::Missing will search lemmas by using these regular expressions |
| 58 | + | Several regular expressions can be used for a single method or function. |
| 59 | + | |
| 60 | + */ |
| 61 | + 'trans_methods' => array( |
| 62 | + 'trans' => array( |
| 63 | + '@trans\(\s*(\'.*\')\s*(,.*)*\)@U', |
| 64 | + '@trans\(\s*(".*")\s*(,.*)*\)@U', |
| 65 | + ), |
| 66 | + 'Lang::Get' => array( |
| 67 | + '@Lang::Get\(\s*(\'.*\')\s*(,.*)*\)@U', |
| 68 | + '@Lang::Get\(\s*(".*")\s*(,.*)*\)@U', |
| 69 | + '@Lang::get\(\s*(\'.*\')\s*(,.*)*\)@U', |
| 70 | + '@Lang::get\(\s*(".*")\s*(,.*)*\)@U', |
| 71 | + ), |
| 72 | + 'trans_choice' => array( |
| 73 | + '@trans_choice\(\s*(\'.*\')\s*,.*\)@U', |
| 74 | + '@trans_choice\(\s*(".*")\s*,.*\)@U', |
| 75 | + ), |
| 76 | + 'Lang::choice' => array( |
| 77 | + '@Lang::choice\(\s*(\'.*\')\s*,.*\)@U', |
| 78 | + '@Lang::choice\(\s*(".*")\s*,.*\)@U', |
| 79 | + ), |
| 80 | + '@lang' => array( |
| 81 | + '@\@lang\(\s*(\'.*\')\s*(,.*)*\)@U', |
| 82 | + '@\@lang\(\s*(".*")\s*(,.*)*\)@U', |
| 83 | + ), |
| 84 | + '@choice' => array( |
| 85 | + '@\@choice\(\s*(\'.*\')\s*,.*\)@U', |
| 86 | + '@\@choice\(\s*(".*")\s*,.*\)@U', |
| 87 | + ), |
| 88 | + ), |
| 89 | + |
| 90 | + |
| 91 | + /* |
| 92 | + |-------------------------------------------------------------------------- |
| 93 | + | Keywords for obsolete check |
| 94 | + |-------------------------------------------------------------------------- |
| 95 | + | |
| 96 | + | Localization::Missing will search lemmas in existing lang files. |
| 97 | + | Then it searches in all PHP source files. |
| 98 | + | When using dynamic or auto-generated lemmas, you must tell Localization::Missing |
| 99 | + | that there are dynamic because it cannot guess them. |
| 100 | + | |
| 101 | + | Example : |
| 102 | + | - in PHP blade code : <span>{{{ trans( "message.user.dynamo.$s" ) }}}</span> |
| 103 | + | - in lang/en.message.php : |
| 104 | + | - 'user' => array( |
| 105 | + | 'dynamo' => array( |
| 106 | + | 'lastname' => 'Family name', |
| 107 | + | 'firstname' => 'Name', |
| 108 | + | 'email' => 'Email address', |
| 109 | + | ... |
| 110 | + | Then you can define in this parameter value dynamo for example so that |
| 111 | + | Localization::Missing will not exclude lastname, firstname and email from |
| 112 | + | translation files. |
| 113 | + | |
| 114 | + */ |
| 115 | + 'never_obsolete_keys' => array( |
| 116 | + 'dynamic' , |
| 117 | + 'fields' , |
| 118 | + ), |
| 119 | + |
| 120 | + |
| 121 | + /* |
| 122 | + |-------------------------------------------------------------------------- |
| 123 | + | Editor |
| 124 | + |-------------------------------------------------------------------------- |
| 125 | + | |
| 126 | + | when using option editor, package will use this command to open your files |
| 127 | + | |
| 128 | + */ |
| 129 | + 'editor_command_line' => '/Applications/Sublime\\ Text.app/Contents/SharedSupport/bin/subl' |
| 130 | + |
| 131 | +); |
0 commit comments