Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/contao-community-alliance/translator
Multipurpose translation manager and interface
https://github.com/contao-community-alliance/translator
Last synced: about 2 months ago
JSON representation
Multipurpose translation manager and interface
- Host: GitHub
- URL: https://github.com/contao-community-alliance/translator
- Owner: contao-community-alliance
- License: lgpl-3.0
- Created: 2014-01-13T23:34:54.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2024-10-23T06:08:51.000Z (3 months ago)
- Last Synced: 2024-10-31T22:16:52.439Z (3 months ago)
- Language: PHP
- Size: 161 KB
- Stars: 2
- Watchers: 9
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Translator
==========
[![Build Status](https://github.com/contao-community-alliance/translator/actions/workflows/diagnostics.yml/badge.svg)](https://github.com/contao-community-alliance/translator/actions)The Contao Community Alliance translation library allows easy use of various translation string sources.
It ships with a collection of various translation string providers:
* Static values that get populated during runtime by code (StaticTranslator).
* Adapter for [Contao CMS](https://github.com/contao/core) language string arrays (LangArrayTranslator).In addition it also provides a translator chain using which various translators can be stacked.
Usage:
------It integrates into the Contao CMS providing a translator service. To use it, just get the service from the
[dependency container](https://github.com/contao-community-alliance/dependency-container):```
translate('yes', 'MSC');// Sub arrays known in Contao can be accessed usng the dot as separator.
$translated = $translator->translate('title.0', 'tl_content');
```Known limitations:
------------------* We have no manual so far. Bummer! :/
* We have not tested it all yet, so please give it a try yourself.