Skip to content

Commit 672b45f

Browse files
authored
Merge pull request #2 from fiskhandlarn/patch-1
Explain pll_translations expected values, clarify trans() usage
2 parents 99d82c1 + d813dd2 commit 672b45f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Register the translations with the `pll_translations` function. They will now be
2424

2525
```php
2626
pll_translations([
27+
'group' => [
28+
'String that should be translatable by Polylang' => 'Explanation of how the string is used',
29+
]
2730
'general' => [
2831
'English' => 'The english language',
2932
'Swedish' => 'The swedish language',
@@ -38,7 +41,7 @@ pll_translations([
3841
Then to fetch and print a translation you can use the `trans` function like you would use regular [__()](https://developer.wordpress.org/reference/functions/__) function.
3942

4043
```php
41-
echo trans('contact-email');
44+
echo trans('I understand');
4245
```
4346

4447
## Documentation

0 commit comments

Comments
 (0)