VitNode
Internationalization (i18n)

Helpers

Functions to help you with internationalization in VitNode.

Display text

You can display text from StringLanguage type as a string.

import { useTextLang } from 'vitnode-frontend/hooks/use-text-lang';
import { StringLanguage } from 'vitnode-shared/string-language.dto';
 
interface Props {
  value: StringLanguage[];
}
 
export const ExampleComponent = async ({ value }: Props) => {
  const { convertText } = await getTextLang(); 
 
  return <div>{convertText(value)}</div>;
};

On this page