-
Hi there, thank you @ivanhofer for this awesome package. My problem:Say I have the following sentence:
When using In other words, my sentence translations would be like this...
... and then I'd reference this sentence with (e.g.) FYI I'm using SvelteKit; in my An ugly workaroundAt the moment I'm translating each piece of the sentence like so:
So that I can reference these splits of data and style them accordingly. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @lucavenir
Thanks for your kind words.
{
sentence: "Hi! This is a sentence. I'd like to write this <strong>sentence</strong> at least <span class="colorful">{number}</span> times.
} <p>
{@html $LL.sentence("one")}
</p>
<style>
p global(.colorful) {
color: yellow;
}
</style> You need to be carefully when styling classes that are located inside the |
Beta Was this translation helpful? Give feedback.
Hi @lucavenir
Thanks for your kind words.
typesafe-i18n
doesn't handle stylung of strings by itself. But you can write the messages however you like. You can write them with HTML markup and use Svelte's@html
to render it.You need to be carefully when styling classes that are located inside the
@html
part. They need to be defined in a global way. Buf if you are using Tailwind's utility cla…