1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 13:24:03 +00:00
laravel-tips/content/tips/you-can-use-strmarkdown-to-build-translation-strings.md
Samuel Štancl 9ff2f9816b Week 28/2022
2022-07-17 20:57:28 +02:00

15 lines
No EOL
622 B
Markdown

---
title: 'You can use `Str::markdown` to build translation strings '
tweet_id: '1547939801373892620'
thread_slug: weekly-thread-2022-28
author_username: danjharrin
images:
- 'https://pbs.twimg.com/media/FXKnQBLWQAAVcuQ.jpg'
created_at: 2022-07-15T13:43:02+00:00
slug: you-can-use-strmarkdown-to-build-translation-strings
---
Ever needed to add HTML *inside* a Laravel translation string, and had to split the string up into chunks?
Or felt bad about raw HTML in your translations?
Here's a little cheat - parse markdown. Most of the formatting you want to do inside a translation string is available. 🤷‍♂️