function exposeHyphenateFunction(lang) {
            /* eslint-disable security/detect-object-injection */
            H.hyphenators = H.hyphenators || empty();
            if (!H.hyphenators[lang]) {
                if (w.Promise) {
                    H.hyphenators[lang] = new Promise(function pro(rs, rj) {
                        H.events.addListener(
                            "engineReady",
                            function handler(e) {
                                if (e.msg === lang) {
                                    rs(H.createHyphenator(e.msg));
                                }
                            },
                            true
                        );
                        H.events.addListener(
                            "loadError",
                            function handler(e) {
                                if (e.name === lang || e.name === "hyphenEngine") {
                                    rj(new Error("File " + e.file + " can't be loaded from " + e.path));
                                }
                            },
                            false
                        );
                    });
                    H.hyphenators[lang].catch(function catchPromiseError(e) {
                        H.events.dispatch(
                            "error",
                            {
                                "lvl": "error",
                                "msg": e.message
                            }
                        );
                    });
                } else {
                    H.hyphenators[lang] = {

                        /**
                         * Fires an error message, if then is called
                         * @returns {undefined}
                         */
                        "then": function () {
                            H.events.dispatch(
                                "error",
                                {"msg": "Promises not supported in this engine. Use a polyfill."}
                            );
                        }
                    };
                }
            }
            /* eslint-enable security/detect-object-injection */
        }
Expose the hyphenate-function of a specific language to
Hyphenopoly.hyphenators.<language>

Hyphenopoly.hyphenators.<language> is a Promise that fullfills
to hyphenate(entity, sel) as soon as the ressources are loaded
and the engine is ready.
If Promises aren't supported (e.g. IE11) a error message is produced.

@param {string} lang - the language
@returns {undefined}