UNPKG

@ptkdev/node-module-boilerplate

Version:

Create your npm library with this user friendly boilerplate. Use this respository as template for your new node library/module

17 lines (16 loc) 641 B
import type { TranslateParamsInterface } from "../types/translate.interfaces"; /** * Translate * ===================== * Get correct translation * * @param {string} lang - language from group/user (mandatory) * @param {string} language_id - key of translation phrase from /translations/*.json (mandatory) * @param {Object} language_params - object with token to replace, example: {name:"alex"} (optional) * * @return {string} text - text of available translation * */ declare const translate: (language_id: string, language_params?: TranslateParamsInterface | undefined) => string; export { translate }; export default translate;