Skip to content

Commit 50fc049

Browse files
committed
Merge branch 'main' of github.com:onpage-dev/onpage-php
2 parents eec612f + 62648f8 commit 50fc049

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ echo $cat->val('description', 'zh'); // you can specify a language
122122
$schema->lang = 'zh';
123123
echo $cat->val('name'); // 再见
124124

125+
// You can also set a fallback language
126+
$schema->lang = 'zh';
127+
$schema->fallback_lang = 'en';
128+
echo $cat->val('description'); // English description if chinese description is missing
129+
125130
// The values function is useful for multivalue fields, it will return a laravel collection of values.
126131
echo $cat->values('bullet_points')->implode('; ');
127132
```

0 commit comments

Comments
 (0)