MCPcopy Create free account
hub / github.com/api-platform/website / Translate

Function Translate

pwa/contexts/con/LanguageContext.tsx:45–63  ·  view source on GitHub ↗
({
    translationKey,
    translationParams,
    className,
  }: {
    translationKey: string;
    translationParams?: TranslationPatterns;
    className?: string;
    html?: boolean;
  })

Source from the content-addressed store, hash-verified

43 const translate = t(dictionary);
44
45 const Translate = ({
46 translationKey,
47 translationParams,
48 className,
49 }: {
50 translationKey: string;
51 translationParams?: TranslationPatterns;
52 className?: string;
53 html?: boolean;
54 }) => {
55 return (
56 <div
57 className={className}
58 dangerouslySetInnerHTML={{
59 __html: translate(translationKey, translationParams),
60 }}
61 />
62 );
63 };
64
65 const getLocaleDictionary = () => dictionary;
66

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected