0

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"
    ];
?>
Sami
  • 141
  • 2
  • 10
  • You are missing a `;` at the end of your array. Can you post the entire error you get? This will provide more information. – Jerodev Nov 14 '18 at 09:38
  • I have the ; at the end of the array. I just wrote this by hand, cause i can't give you details of my project. I get blank page and text "The page has expired due to inactivity. Please refresh and try again. " instead of the popup that i want with the message from localisations. – Sami Nov 14 '18 at 09:42

2 Answers2

0

Array construct requires => not =

<?php
return [
    'myLocalization' => "My text is 
                         on multiple lines"
];
Tim
  • 8,036
  • 2
  • 36
  • 52
0

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"
    ];
?>