import { PluginObject } from 'vue';
declare module 'vue/types/vue' {
    interface Vue {
        $i18n: Messages;
    }
}
/**
 * This package provides language and locales utilities.
 */
/**
 * French language code.
 */
export declare const FRENCH: string;
/**
 * English language code.
 */
export declare const ENGLISH: string;
export declare type MessageMap = {
    [key: string]: string;
};
export declare type BundleMessagesMap = {
    [bundle: string]: MessageMap;
};
/**
 * Special characters must be represented as their unicode equivalent \u00xxxx
 */
export declare enum SpecialCharacter {
    NBSP = "160",
    NBHYPHEN = "8209",
    EMDASH = "8212",
    ENDASH = "8211"
}
export declare enum DebugMode {
    Throw = 0,
    Warn = 1,
    Prod = 2
}
export interface I18nPluginOptions {
    curLang?: string;
    debug?: DebugMode;
    formatMode?: FormatMode;
}
export declare enum FormatMode {
    Default = "",
    Vsprintf = "vsprintf",
    Sprintf = "sprintf"
}
export declare class Messages {
    private options?;
    private curLang;
    private curLocale;
    private formatMode;
    private messages;
    private specialCharacterDict;
    constructor(options?: I18nPluginOptions | undefined);
    /**
     * Set the application language globally
     *
     * @param lang The language, for example: 'en'
     */
    currentLang(lang?: string): string;
    /**
     * Get current locale
     */
    getCurrentLocale(): string;
    get currentLocale(): string;
    /**
     * Adds the messages so that they can be resolved.
     *
     * @param lang The language, for example: 'en'
     * @param messages The messages
     */
    addMessages(lang: string, bundle: BundleMessagesMap): void;
    /**
     * Allows to translate a key into the specified language.
     *
     * The resolution is made in this order:
     *
     * key.nb.modifier
     * key.p.modifier
     * key.nb
     * key.p
     * key.modifier
     * key
     */
    translate(key: string, params?: any, nb?: number, modifier?: string, htmlEncodeParams?: boolean, formatMode?: FormatMode): string;
    /**
     * format a string with depending on the option formatMode
     * @param {string} val the string to format
     * @param {any[]} params the values to insert in string
     */
    private format;
    private resolveKey;
    /**
     * Build the list of special characters that are automatically replaced to the desired pattern
     *
     * Example with '_' as PREFIXE and SUFIXE
     * NBSP => _NBSP_ : '\xOA'
     */
    private initSpecialCharactersDict;
    /**
     * Finds a key in the available messages or returns null.
     *
     * @param lang The language to use
     * @param key The key to find
     */
    private findKey;
}
declare const MessagePlugin: PluginObject<any>;
export default MessagePlugin;
//# sourceMappingURL=i18n.d.ts.map