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:
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
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
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
Comment