Skip to content

Commit

Permalink
Merge pull request #2 from fiskhandlarn/patch-1
Browse files Browse the repository at this point in the history
Explain pll_translations expected values, clarify trans() usage
  • Loading branch information
vinkla authored May 12, 2017
2 parents 99d82c1 + d813dd2 commit 672b45f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Register the translations with the `pll_translations` function. They will now be

```php
pll_translations([
'group' => [
'String that should be translatable by Polylang' => 'Explanation of how the string is used',
]
'general' => [
'English' => 'The english language',
'Swedish' => 'The swedish language',
Expand All @@ -38,7 +41,7 @@ pll_translations([
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.

```php
echo trans('contact-email');
echo trans('I understand');
```

## Documentation
Expand Down

0 comments on commit 672b45f

Please sign in to comment.