New Line in I18n Message Json

44 views
Skip to first unread message

Simon Eiberger

unread,
Feb 7, 2023, 9:43:41 AM2/7/23
to DSpace Technical Support
Hello,
Is it possible to insert a line break in a message text in the JSON files in the I18n folder? I've tried different types of \ and \n but so far without success.

Thank you in Advance.
Simon

Mark H. Wood

unread,
Feb 8, 2023, 9:39:34 AM2/8/23
to dspac...@googlegroups.com
On Tue, Feb 07, 2023 at 06:43:40AM -0800, Simon Eiberger wrote:
> Hello,
> Is it possible to insert a line break in a message text in the JSON files
> in the I18n folder? I've tried different types of \ and \n but so far
> without success.

I would guess that the newline is being discarded by the rules of HTML
rendering. You could try using an HTML "br" element. If it works,
please tell us.

--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu
signature.asc

iris.h...@zhaw.ch

unread,
May 12, 2023, 8:23:21 AM5/12/23
to DSpace Technical Support

Hello Simon

I have the same problem. Does the suggested solution work for you?

The HTML rendering doesn't work for me at all.

Best regards 

Iris

Michael Plate

unread,
May 12, 2023, 8:41:51 AM5/12/23
to dspac...@googlegroups.com
Hi,

Am 12.05.23 um 14:23 schrieb iris.h...@zhaw.ch:
>
> Hello Simon
>
> I have the same problem. Does the suggested solution work for you?
>
> The HTML rendering doesn't work for me at all.

if I remember it correct,

try <br/> in the JSON and you have to change the template for that,
instead of
<p>{{some.i18n.string | translate}}</p>

use

<p [innerHTML]="'some.i18n.string' | translate"></p>

Michael

Reply all
Reply to author
Forward
0 new messages