mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 13:24:41 +03:00
Use "en" locale as a fallback for MailTemplate
This commit is contained in:
parent
c4a47928a8
commit
6768fe96c2
@ -96,7 +96,7 @@ class Template
|
|||||||
* @param string $locale Locale of the template to load.
|
* @param string $locale Locale of the template to load.
|
||||||
* @param boolean $strict Indicates if only specified locale should be used.
|
* @param boolean $strict Indicates if only specified locale should be used.
|
||||||
* If the argument is set to false and there is no template for
|
* If the argument is set to false and there is no template for
|
||||||
* specified locale a template for default locale will be loaded.
|
* specified locale a template for "en" locale will be loaded.
|
||||||
* @return boolean|Ban Returns a Template instance or boolean false on
|
* @return boolean|Ban Returns a Template instance or boolean false on
|
||||||
* failure.
|
* failure.
|
||||||
*/
|
*/
|
||||||
@ -123,13 +123,13 @@ class Template
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to load a template with specified name for the default locale.
|
// Try to load a template with specified name for "en" locale.
|
||||||
if ($locale != get_default_locale()) {
|
if ($locale != 'en') {
|
||||||
return self::loadByName($name, get_default_locale());
|
return self::loadByName($name, 'en');
|
||||||
}
|
}
|
||||||
|
|
||||||
// There is no template with specified name neither for specified locale
|
// There is no template with specified name neither for specified locale
|
||||||
// nor for the default one.
|
// nor for "en" locale.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user