<commit_before># Multilanguage

## Static strings in templates
To translate static strings in the Twig templates Woodlets prodvides the filter ```trans```. This filter is **not** the same as the one provided by Twigs i18n Extension.  
It's a wrapper for the WordPress [translate function](http://codex.wordpress.org/Function_Reference/translate) and therefore works fine with the text domain handling of WordPress.

### Example
Provide the text domain as first parameter.
```twig
woodlets.add('text', 'headline', {
  'label': 'headline'|trans('my-theme')
})
```

You can use the second parameter for parameterized translations.
```twig
{#
Translate string for search_headline should look like:
"%d search results for %s"
#}
<h2>{{ 'search_headline'|trans('my-theme', [resultsCount, searchString]) }}
```

## Page content
Woodlets doesn't provide any multilanguage support for page content on it's own. Unfortunately Woodlets also doesn't work well with most of the multilanguage plugins out there.

However for the moment we recommend using the [Multisite Language Switcher](https://www.wordpress.org/plugins/multisite-language-switcher/) for your multilingual pages. Woodlets works perfectly fine with it and it's a very clean solution for multilingual WordPress content.  
[MultilingualPress](https://www.wordpress.org/plugins/multilingual-press/) seems to work also fine if the "Advanced translator" setting is disabled.

We may check, add and maintain compatibility to other multilanguage plugins in future releases of Woodlets. Feel free to start a discussion about compatibility to your favorite plugin on the [issue tracker](https://github.com/Neochic/Woodlets/issues) and we'll check if we may get it work.<commit_msg>Update i18n.md<commit_after># Multilanguage

## Static strings in templates
To translate static strings in the Twig templates Woodlets prodvides the filter ```trans```. This filter is **not** the same as the one provided by Twigs i18n Extension.  
It's a wrapper for the WordPress [translate function](http://codex.wordpress.org/Function_Reference/translate) and therefore works fine with the text domain handling of WordPress.

### Example
Provide the text domain as first parameter.
```twig
woodlets.add('text', 'headline', {
  'label': 'headline'|trans('my-theme')
})
```

You can use the second parameter for parameterized translations.
```twig
{#
Translate string for search_headline should look like:
"%d search results for %s"
#}
<h2>{{ 'search_headline'|trans('my-theme', [resultsCount, searchString]) }}
```

## Page content
Woodlets doesn't provide any multilanguage support for page content on it's own. Unfortunately Woodlets also doesn't work well with some of the multilanguage plugins out there.

However for the moment we recommend using the [Multisite Language Switcher](https://www.wordpress.org/plugins/multisite-language-switcher/) for your multilingual pages. Woodlets works perfectly fine with it and it's a very clean solution for multilingual WordPress content.  
[MultilingualPress](https://www.wordpress.org/plugins/multilingual-press/) seems to work also fine if the "Advanced translator" setting is disabled.  
Also [Polylang](https://wordpress.org/plugins/polylang/) seems to work fine.

We may check, add and maintain compatibility to other multilanguage plugins in future releases of Woodlets. Feel free to start a discussion about compatibility to your favorite plugin on the [issue tracker](https://github.com/Neochic/Woodlets/issues) and we'll check if we may get it work.
{'fraction_non_alphanumeric': 0.08975084937712344, 'fraction_numerical': 0.0022650056625141564, 'mean_word_length': 5.35431654676259, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 7, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6107545', 'n_tokens_mistral': 953, 'n_tokens_neox': 895, 'n_words': 414}