UNPKG

@plteam/chat-ui

Version:

CUI Kit is a free and open-source library for creating AI assistant chat interfaces, built with React, Material UI, and TypeScript

17 lines (16 loc) 403 B
/** * @deprecated * use Localization instead * @see Localization * @see useLocalizationContext */ export const lng = (array, replace) => { let text = array[0] ?? ''; if (text && replace) { for (const key in replace) { const value = replace[key]?.toString() ?? ''; text = text.replace(`{{${key}}}`, value); } } return text; };