UNPKG

@genexus/web-standard-functions

Version:

GeneXus JavaScript standard functions library for web generators

21 lines 877 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getMessageText = void 0; const translationService_1 = require("../config/translationService"); /** * Searches the language object (or the current language if that parameter is omitted) for a given message code * @param {string} str The message identifier * @param {string} languageName The language name, may be omitted * @return {string} The translation of the given message in the specified language or the current language */ const getMessageText = (str, languageName) => { const translator = translationService_1.TranslationService.getInstance(); if (!languageName) { return translator.translate(str); } else { return translator.translate(str, languageName); } }; exports.getMessageText = getMessageText; //# sourceMappingURL=getMessageText.js.map