@@ -48,14 +48,89 @@ This is the contents of the published config file:
4848
4949``` php
5050return [
51- 'source_language' => env('TRANSLATIONS_SOURCE_LANGUAGE', 'en'), // Source Language
51+ /*
52+ |--------------------------------------------------------------------------
53+ | Source Language
54+ |--------------------------------------------------------------------------
55+ |
56+ | This is the language that will be used as the source language for
57+ | the translations. This language will be used to import the
58+ | translations from the files.
59+ |
60+ */
61+ 'source_language' => env('TRANSLATIONS_SOURCE_LANGUAGE', 'en'),
62+
63+
64+
65+ /*
66+ * Language lines will be fetched by these loaders. You can put any class here that implements
67+ * the Samehdoush\LaravelTranslationsApi\TranslationLoaders\TranslationLoader-interface.
68+ */
69+ 'translation_loaders' => [
70+ Samehdoush\LaravelTranslationsApi\TranslationLoaders\Db::class,
71+ ],
72+ /*
73+ * This is the model used by the Db Translation loader. You can put any model here
74+ * that extends Samehdoush\LaravelTranslationsApi\Models\Phrase.
75+ */
76+ 'model' => Samehdoush\LaravelTranslationsApi\Models\Phrase::class,
77+
78+ /*
79+ * This is the translation manager which overrides the default Laravel `translation.loader`
80+ */
81+ 'translation_manager' => Samehdoush\LaravelTranslationsApi\TranslationLoaderManager::class,
82+ /*
83+ |--------------------------------------------------------------------------
84+ | Exclude Files
85+ |--------------------------------------------------------------------------
86+ |
87+ | The following files will be ignored during the import process.
88+ | and those files will be ignored in every language.
89+ |
90+ */
5291 'exclude_files' => [
5392 //'validation.php', // Exclude default validation for example.
5493 ],
94+
95+ /*
96+ |--------------------------------------------------------------------------
97+ | Laravel Translations Path
98+ |--------------------------------------------------------------------------
99+ |
100+ | The default is `translations` but you can change it to whatever works best and
101+ | doesn't conflict with the routing in your application.
102+ |
103+ */
55104 'route_prefix' => env('TRANSLATIONS_PATH', 'translations'),
56- 'middleware' => ['api','auth:sanctum'],
105+
106+
107+
108+ /*
109+ |--------------------------------------------------------------------------
110+ | Laravel Translations route middleware
111+ |--------------------------------------------------------------------------
112+ |
113+ | These middleware will be assigned to every Laravel Translations route, giving you
114+ | the chance to add your own middleware to this list or change any of
115+ | the existing middleware. Or, you can simply stick with this list.
116+ |
117+ */
118+
119+ 'middleware' => ['api', 'auth:sanctum'],
120+
121+ /*
122+ |--------------------------------------------------------------------------
123+ | Database Connection
124+ |--------------------------------------------------------------------------
125+ |
126+ | The database connection that should be used to store the imported
127+ | translations You may specify the connection as a string
128+ | which is the name of the connection in the database.php file
129+ |
130+ */
57131 'database_connection' => env('TRANSLATIONS_DB_CONNECTION', null),
58132];
133+
59134```
60135
61136## Usage
0 commit comments