vufind-org/vufind — pull request #177 by nicokarrer (2014-07-21 09:45:37+00:00)
Title: Enable text-domains for translations

Enables translation / label definition over text-domains.

*Benefits:*

* Could help to tidy-up the current language files by using contexts.
* Allows multiple use of label-keys depending on the context:
* names.ini; libraryA = "Name of library A"
* links.ini; libraryA = "Link to library A"

*How to:*

* A Subfolder in the languages folder defines a text-domain.

```
languages/date/en.ini
```
* Definition of text-domains in config.ini:

```
[TextDomains]
textDomains[] = date
```
* Use with transEsc view-helper:

```php
$this->transExc('date::day_placeholder')
```

*Comments*
* Current label handling stays the same.
* Alternatives to the '::'-notation would have been:
* Fourth paramter in transEsc view-helper. But that would be a bit unhandy.
* Separate view-helper or direct use of the zendTranslator view-helper (would exclude escaping).