From 4f165660cdbb2c3471d856a7e1b3c4fd956f5c40 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 11 Aug 2017 20:45:45 +0200 Subject: [PATCH] Language call fix --- basics/views.md | 2 +- services/localization.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/basics/views.md b/basics/views.md index bd2262e..123c41c 100644 --- a/basics/views.md +++ b/basics/views.md @@ -12,7 +12,7 @@ In case the response header is set to JSON the view will automatically get parse The base view class contains the request as well as the response objects hence it also contains the request/response localization. One of the most important methods is the `getText()` method. This private method allows for module and theme specific translations of defined language elements. -In the template you can simply use `$this->getText({TEXT_ID})` for localized text. All other localization elements can be accessed in a similar way e.g. `$this->l11n->getTemperature()` +In the template you can simply use `$this->getHtml({TEXT_ID})` for localized text. All other localization elements can be accessed in a similar way e.g. `$this->l11n->getTemperature()` ## Templates diff --git a/services/localization.md b/services/localization.md index 8b0c5c4..0765ea6 100644 --- a/services/localization.md +++ b/services/localization.md @@ -7,13 +7,13 @@ Most of the localization is stored inside the localization object which is part Language specific text can be used through the `LocalizationManager`, either by directly calling the `getText()` function of the localization manager ``` -$this->l11nManager->getText({LANGUAGE}, {MODULE}, {THEME}, {TEXT}) +$this->l11nManager->getHtml({LANGUAGE}, {MODULE}, {THEME}, {TEXT}) ``` or indirectly by calling the `getText()` in the view context. ``` -$this->getText({TEXT}) +$this->getHtml({TEXT}) ``` The language that should be used for a response should always be depending on the requested language and therefore never be hard coded.