import React from '../../lib/teact/teact'; import type { LangFnParameters } from '../../util/localization'; import useLang from '../../hooks/useLang'; const storedParameter: LangFnParameters = { key: 'StickerPackAddStickerCount', variables: { count: 42, }, }; const storedAdvancedParameter: LangFnParameters = { key: 'VoipPeerIncompatible', variables: { user: 'Some user', }, options: { withNodes: true, withMarkdown: true, }, }; const TestLocale = () => { const lang = useLang(); return (

{lang('NothingFound')}

{lang.with(storedParameter)}

{lang.with(storedAdvancedParameter)}

{lang('LimitReachedChatInFolders', { limit: 'first limit', limit2: 'second limit', }, { withNodes: true, withMarkdown: true, })}

{lang('Participants', { count: 42 })}

{lang('ChatServiceGroupUpdatedPinnedMessage1', { message: 'Some message', user: 'Some user', })}

{/*

{lang('LocalTestString', { link: this link, secondLink: this second link, user: lang.disjunction(['Some __tricky__ user', 'Another user', 'Third user']), }, { withNodes: true, withMarkdown: true, specialReplacement: { '⚡': , }, })}

*/}
); }; export default TestLocale;