-
Notifications
You must be signed in to change notification settings - Fork 578
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2171b55
commit 789c888
Showing
4 changed files
with
122 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<?php | ||
|
||
return [ | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| Application Locales | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Contains an array with the applications available locales. | ||
| | ||
*/ | ||
'locales' => ['en', 'fr', 'pt-BR'], | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Locale separator | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This is a string used to glue the language and the country when defining | ||
| the available locales. Example: if set to '-', then the locale for | ||
| colombian spanish will be saved as 'es-CO' into the database. | ||
| | ||
*/ | ||
'locale_separator' => '-', | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Default locale | ||
|-------------------------------------------------------------------------- | ||
| | ||
| As a default locale, Translatable takes the locale of Laravel's | ||
| translator. If for some reason you want to override this, | ||
| you can specify what default should be used here. | ||
| | ||
*/ | ||
'locale' => null, | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Use fallback | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Determine if fallback locales are returned by default or not. To add | ||
| more flexibility and configure this option per "translatable" | ||
| instance, this value will be overridden by the property | ||
| $useTranslationFallback when defined | ||
| | ||
*/ | ||
'use_fallback' => false, | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Use fallback per property | ||
|-------------------------------------------------------------------------- | ||
| | ||
| The property fallback feature will return the translated value of | ||
| the fallback locale if the property is empty for the selected | ||
| locale. Note that 'use_fallback' must be enabled. | ||
| | ||
*/ | ||
'use_property_fallback' => true, | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Fallback Locale | ||
|-------------------------------------------------------------------------- | ||
| | ||
| A fallback locale is the locale being used to return a translation | ||
| when the requested translation is not existing. To disable it | ||
| set it to false. | ||
| | ||
*/ | ||
'fallback_locale' => 'en', | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Translation Suffix | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Defines the default 'Translation' class suffix. For example, if | ||
| you want to use CountryTrans instead of CountryTranslation | ||
| application, set this to 'Trans'. | ||
| | ||
*/ | ||
'translation_suffix' => 'Translation', | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Locale key | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Defines the 'locale' field name, which is used by the | ||
| translation model. | ||
| | ||
*/ | ||
'locale_key' => 'locale', | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Always load translations when converting to array | ||
|-------------------------------------------------------------------------- | ||
| Setting this to false will have a performance improvement but will | ||
| not return the translations when using toArray(), unless the | ||
| translations relationship is already loaded. | ||
| | ||
*/ | ||
'to_array_always_loads_translations' => true, | ||
]; |