Skipping translations
Problem
By default, Lingo.dev Compiler translates all text that appears within React elements. In some cases though, you don't want to translate a particular piece of text.
Solution
You have a couple of options:
- Use the
data-lingo-skip
attribute on the element(s) that contains the text. - Put the text in a string literal. (The compiler skips these by design.)
Example: Skipping with attributes
export function App() {
return <div data-lingo-skip>This content will not be translated.</div>;
}
Example: Skipping string literals
export function App() {
const text = "This content is a string literal and will not be translated.";
return <div>{text}</div>;
}