Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Add fallback support

Compare
Choose a tag to compare
@vinkla vinkla released this 29 Jan 14:35
· 325 commits to master since this release

Fetch the default translation if the current locale doesn't have any translated attributes yet. In the example below the current article doesn't have have the title attribute translated to Swedish yet.

App::setLocale('en');
echo $article->title; // return 'Five Ants Are More than Four Elephants'

App::setLocale('sv');
echo $article->title; // returns 'Five Ants Are More than Four Elephants'

This can be turned off/on in the config.php file.