PHPackages                             genxbe/k3-fragments - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. genxbe/k3-fragments

ActiveKirby-plugin[Localization &amp; i18n](/categories/localization)

genxbe/k3-fragments
===================

Kirby3 plugin to make it possible to use translated strings that can be easily translated in the panel.

1.0.2(3y ago)8162MITPHP

Since Jul 20Pushed 3y ago3 watchersCompare

[ Source](https://github.com/genxbe/k3-fragments)[ Packagist](https://packagist.org/packages/genxbe/k3-fragments)[ RSS](/packages/genxbe-k3-fragments/feed)WikiDiscussions main Synced yesterday

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

Kirby3 Fragments
================

[](#kirby3-fragments)

Kirby3 Fragments is a small string/translation helper. You can use fragments in your code 'laravel/blade' style and optionally translate them on site or page level. Additionaly you can pass placeholders to the fragment.

A perfect solution for translation of static labels etc... But can also be used to make other 'static' content manageable via the CMS.

Syntax
------

[](#syntax)

`__(string $fragment, array $placeholders = [])`

- $fragment : Can be any string or label, you can either choose to use 'Firstname' or rather work with 'label.firstname'. Whichever you prefer.
- $placeholders : Kirby style placeholders (See [Str::template()](https://getkirby.com/docs/reference/objects/toolkit/str/template) for more information)

### Usage

[](#usage)

- Add Fragment blueprint to site and/or page to blueprint

```
tabs:
  fragments: tabs/fragments
```

- Use k3-fragments string helper in code

```
