(
{message, id}: TranslateParam<Str>,
values?: InterpolateValues<Str, string | number>,
)
| 31 | // - translating page titles (meta) |
| 32 | // - translating string props (input placeholders, image alt, aria labels...) |
| 33 | export function translate<Str extends string>( |
| 34 | {message, id}: TranslateParam<Str>, |
| 35 | values?: InterpolateValues<Str, string | number>, |
| 36 | ): string { |
| 37 | const localizedMessage = getLocalizedMessage({message, id}); |
| 38 | return interpolate(localizedMessage, values); |
| 39 | } |
| 40 | |
| 41 | // Maybe we'll want to improve this component with additional features |
| 42 | // Like toggling a translation mode that adds a little translation button near |
no test coverage detected
searching dependent graphs…