# Gettext with html replacement

**URL:** <https://forum.elixirforum.com/t/gettext-with-html-replacement/29484>\
**Category:** Questions\
**Tags:** gettext\
**Created:** [February 28, 2020, 4:36pm UTC](https://forum.elixirforum.com/t/gettext-with-html-replacement/29484 "2020-02-28T16:36:37Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![egze](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/egze/32/13522_2.png) [@egze](https://forum.elixirforum.com/u/egze)\
**Post date:** [February 28, 2020, 5:00pm UTC](https://forum.elixirforum.com/t/gettext-with-html-replacement/29484/3 "2020-02-28T17:00:56Z")

</div>

I suggest you try to keep html out of translations.

How about something like this:

```elixir
<%= gettext("score.current", score_html: "<b>#{score}</b>") %>

```

The GetText key would be: `You score is %{score_html} points.`

Maybe you’ll need to combine it with `HTML.raw`.

---

_[View the full topic](https://forum.elixirforum.com/t/gettext-with-html-replacement/29484)._
