O
O
owl-cat2017-09-29 10:19:36
PHP
owl-cat, 2017-09-29 10:19:36

Storing html markup in localization files?

I'm making a multilingual site in laravel. I have a lot of static text that I have stuffed into the language files. Is it good to store translations with html markup?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor Vorotnev, 2017-09-29
@owl-cat

Is it good? A controversial issue, but as far as I know, there is no other option out of the box. The main thing is to follow 2 rules:
1. Avoid markup as such (div, header, etc.) in translation files. Limit to inline formatting elements such as strong, sub, etc. If you have to insert a large piece with more general tags, it should probably be broken into smaller phrases.
2. Don't forget to output correctly with {!! $string !!}

I
Ivan, 2017-09-29
@LiguidCool

No.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question