Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Serverside DSField.getTitle() returns more than just the i18n/l10n key or the localized title

    Hi Isomorphic,

    when using DataSource l10n with fmt-tags in current 6.1p DSField.getTitle() returns more than just the l10n key or the localized title. This is also what the docs say:
    Returns the title of this field, if any. Note that the title may not really be a String; it is possible that it may be a LocaleMessage instead. In this case, the returned value is a String describing the key and value of the LocaleMessage
    Could you also add an API getTitleKey() or similar, that just returns the key? I need it in order to get the l10n title for a given language in a standalone DataSource usage case.
    I'm pretty sure that relying on the format of the returned string and parsing out the key with a regexp is not the correct way, but I'm doing that currently because I don't have that API.
    Alternatively a getTitle(String language) API, that does return the l10ed string would also be nice.

    Best regards
    Blama

    #2
    We've added some methods to DSField and changed the output of existing getTitle() method. Please see the javadoc for getTitle(), getTitle(Locale) and getTitleKey() methods for details. This will be available in 6.1 since Aug 26 (tomorrow).

    Comment

    Working...
    X