Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
- Home
- General
- Feature Requests
- RE: RE: Default Translation Support for editable Fields inside of a Fragment
RE: RE: Default Translation Support for editable Fields inside of a Fragment
As a Content-Editor i want to provide some default translation for
editable fields inside of a Fragment.
Due to limitations listed inside
of https://liferay.atlassian.net/browse/LRDOCS-12045 it is currently
not possible to execute freemarker code inside of fragments and
retrieve a translated key. For example (This does not work):
<button> <span data-lfr-editable-id="text1" data-lfr-editable-type="rich-text"> ${languageUtil.get(locale,'user')} </span> </button>
Solution A: Maybe liferay can allow freemarker code
inside editable-fragments by not persisting the default value but only
the values if edited by the user?
Solution B: Or alternativly Liferay could add an
additional data-tag to perform translation on provided key entries:
<button> <span data-lfr-editable-id="text1" data-lfr-editable-type="rich-text" data-lfr-translate-content="true"> user </span> </button>
So for english-users the button shows "User" and for german-users it would show "Benutzer"? Of course only if there is an Liferay Language Key available that matches.
Feature Request Created: https://liferay.atlassian.net/browse/LPS-197253
Please see https://liferay.atlassian.net/browse/LPS-197253 for an update.
Powered by Liferay™