Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note that Magnolia provides many so called "generic keys" which are already translated and which may fit to your items. See generic i18n keys and their list for further details.

Key generators

...

Info

Use

Javadoc
0info.magnolia.i18nsystem.I18nable
and
Javadoc
0info.magnolia.i18nsystem.I18nText
for custom definition classes which should be i18n-ized.

(warning) From (info) From Magnolia 6.2.1, any method annotated with

Javadoc
0info.magnolia.i18nsystem.I18nText
 uses @I18nText(fallback = "") if NO_FALLBACK by default if no translation is found.

Code Block
languagejava
titleinfo.magnolia.i18nsystem.I18nText
public @interface I18nText {

    /**
     * Without {@link #fallback()} explicitly specified, {@link info.magnolia.i18nsystem.TranslationServiceImpl} use the longest i18n key if translation key is not found as fallback.
     */
    String NO_FALLBACK = "<no-fallback>";

    /**
     * @return Value to be used if no translation is found.
     */
    String fallback() default NO_FALLBACK;
}

SimpleTranslator – using i18n in Java classes

...