@progress/kendo-angular-l10n
Version:
Localization Services - Kendo UI Angular
46 lines (45 loc) • 1.76 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2021 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var core_1 = require("@angular/core");
var rxjs_1 = require("rxjs");
/* tslint:disable:max-line-length */
/**
* A base class for a service that returns localized messages.
*
* For more information, refer to the section on [using the message service]({% slug messages_l10n %}#toc-using-the-message-service).
*/
var MessageService = /** @class */ (function () {
function MessageService() {
/**
* @hidden
*/
this.changes = new rxjs_1.BehaviorSubject({ rtl: undefined });
}
/**
* Notifies the components that the messages were changed.
*
* @param rtl - (Optional) A new value for the [text direction token]({% slug api_l10n_rtl %}).
*/
MessageService.prototype.notify = function (rtl) {
this.changes.next({ rtl: rtl });
};
/**
* Returns a localized message for the supplied key.
*
* @param key - The message key. For example, `"kendo.grid.noRecords"`.
* @return - The localized message for this key or `undefined` if not found.
*/
MessageService.prototype.get = function (key) {
return undefined;
};
MessageService = tslib_1.__decorate([
core_1.Injectable()
], MessageService);
return MessageService;
}());
exports.MessageService = MessageService;