diff --git a/docs/janssen-server/developer/agama/faq.md b/docs/janssen-server/developer/agama/faq.md index 5b04d0e0259..f5b763206c1 100644 --- a/docs/janssen-server/developer/agama/faq.md +++ b/docs/janssen-server/developer/agama/faq.md @@ -99,7 +99,7 @@ More advanced bean lookup capabilities are provided by method `instance` of [thi ### How to implement localization? -This topic is covered [here](./advanced-usages.md#localization). +This topic is covered [here](./advanced-usages.md#localization-and-internationalization). ### How to modify the built-in error pages? @@ -178,6 +178,20 @@ See the examples in the Looping section of the [language reference](../../../aga You can assign this value to a variable at the top of your loop declaration. See the examples in the Looping section of the [language reference](../../../agama/language-reference.md#looping). +### How to access localization labels from Java code? + +In Freemarker, [localization](./advanced-usages.md#localization-and-internationalization) labels are accessed using the `${labels(key, ...)}` notation. The following would be a Java equivalent: + +``` +import io.jans.agama.engine.service.LabelsService; +... + +lbls = io.jans.service.cdi.util.CdiUtil.bean(LabelsService.class); +String label = lbls.get("