PHPackages                             dotblue/nette-templating - 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. [Templating &amp; Views](/categories/templating)
4. /
5. dotblue/nette-templating

ActiveLibrary[Templating &amp; Views](/categories/templating)

dotblue/nette-templating
========================

Localizable templates with smooth setup in Nette Framework

2.0.0(12y ago)63.0kBSD-3-ClausePHPPHP &gt;=5.4

Since Mar 24Pushed 12y ago4 watchersCompare

[ Source](https://github.com/dotblue/nette-templating)[ Packagist](https://packagist.org/packages/dotblue/nette-templating)[ RSS](/packages/dotblue-nette-templating/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (5)Used By (0)

Localizable templates with smooth setup in Nette Framework
----------------------------------------------------------

[](#localizable-templates-with-smooth-setup-in-nette-framework)

#### Requirements

[](#requirements)

- PHP 5.4+
- [nette/nette](https://github.com/nette/nette) &gt;= 2.1

Installation
------------

[](#installation)

1. Copy source codes from Github or using [Composer](http://getcomposer.org/):

```
$ composer require dotblue/nette-templating@~1.0
```

2. Register as Configurator's extension:

```
extensions:
    templateHelpers: DotBlue\Templating\Helpers\Extension

```

3. Register your helpers:

```
templateHelpers:
    - ShoutHelper

```

How should `MyHelper` look?
---------------------------

[](#how-should-myhelper-look)

```
use DotBlue\Templating\Helpers;

class ShoutHelper implements Helpers\IHelper
{

    public function getName()
    {
        return 'shout';
    }

    public function execute($value, Helpers\Options $options)
    {
        return $value . '!';
    }

}
```

All arguments are wrapped in `Options` object.

```
public function execute($value, Helpers\Options $options)
{
    $mark = $options->first('!');
    return $value . $mark;
}
```

```
{var $text = 'Hi'}
{$text|shout:'!!!'} {* print "Hi!!!" *}
```

Localization
------------

[](#localization)

You can use new macro `{locale $language /}` in your templates (best place is your layout). Provided `$language` variable is then available in helper via `Options` object:

```
$language = $options->getLocale();
```

`$language` can be anything you wish. You can also place `{locale}` macro in template multiple times, for example to print amount of money in all localized versions (using hypothetical `currency` helper):

```
{foreach $languages as $language}
    {locale $language}
        {$money|currency}
    {/locale}
{/foreach}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~16 days

Total

4

Last Release

4382d ago

Major Versions

1.0.2 → 2.0.02014-05-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/920689f25a0fc31b2807556eddd47203f33c4318893bce98818cf2f3e627ee8e?d=identicon)[vojtechdobes](/maintainers/vojtechdobes)

---

Top Contributors

[![vojtech-dobes](https://avatars.githubusercontent.com/u/415925?v=4)](https://github.com/vojtech-dobes "vojtech-dobes (6 commits)")

---

Tags

helpersnettetemplates

### Embed Badge

![Health badge](/badges/dotblue-nette-templating/health.svg)

```
[![Health](https://phpackages.com/badges/dotblue-nette-templating/health.svg)](https://phpackages.com/packages/dotblue-nette-templating)
```

###  Alternatives

[latte/latte

☕ Latte: the intuitive and fast template engine for those who want the most secure PHP sites. Introduces context-sensitive escaping.

1.3k15.7M683](/packages/latte-latte)[league/plates

Plates, the native PHP template system that's fast, easy to use and easy to extend.

1.5k5.9M232](/packages/league-plates)[laminas/laminas-view

Fast and type safe HTML templating library with a flexible plugin system supporting multistep template composition

7526.3M230](/packages/laminas-laminas-view)[infyomlabs/adminlte-templates

AdminLTE templates for InfyOm Laravel Generator

2681.6M7](/packages/infyomlabs-adminlte-templates)[gamajo/template-loader

A class for your WordPress plugin, to allow loading template parts with fallback through the child theme &gt; parent theme &gt; plugin

29647.0k5](/packages/gamajo-template-loader)[contributte/forms-bootstrap

Nette extension for Bootstrap forms

211.1M4](/packages/contributte-forms-bootstrap)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
