Laravel localization multiline

1.1k Views Asked by At

I have a question. I want to localize a multi line text in laravel, in file content.php from /lang/en. The proble is that if i break the text in lines(so that my code looks more readable) i get error 419. My code would look like this:

<?php
    return [
        'myLocalization' = "My text is 
                            on multiple lines"
    ];
?>
2

There are 2 best solutions below

0
On

Array construct requires => not =

<?php
return [
    'myLocalization' => "My text is 
                         on multiple lines"
];
0
On

You can use <br> tag

<?php
    return [
        'myLocalization' = "My text is <br>
                            on multiple lines"
    ];
?>

Or in one line

<?php 
    return [
        'myLocalization' = "My text is <br>on multiple lines"
    ];
?>