RE: RE: Default Translation Support for editable Fields inside of a Fragment

thumbnail
Jamie Sammons, modified 1 Year ago. New Member Posts: 2 Join Date: 8/28/20 Recent Posts

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.  

thumbnail
Jamie Sammons, modified 2 Years ago. Expert Posts: 367 Join Date: 9/5/14 Recent Posts

Feature Request Created: https://liferay.atlassian.net/browse/LPS-197253

thumbnail
Jamie Sammons, modified 1 Year ago. Expert Posts: 367 Join Date: 9/5/14 Recent Posts

Please see https://liferay.atlassian.net/browse/LPS-197253 for an update.