i18n

In version 1.9.3, I18N internationalization support has been added. At present, it mainly implements Chinese and English versions. If new language support is required later, you can give me [issue] (https://github.com/xiaoymin/Swagger-Bootstrap-UI/issues/new) or modify the i18n.jsfile in the project and submit PR to me.

swagger-bootstrap-ui Determine the default language version of the current browser by reading the navigator object of the browser

//Current language
if(window.navigator){
    var lang =(navigator.language || navigator.browserLanguage);
    if(lang!=null&&lang!=undefined&&lang!=""){
        lang=lang.toLowerCase();
        if (lang.indexOf("en")>0){
            this.language="en";
        }
    }
}

If you want to use the default language version of the non-current browser, you can switch in the settings function.

swagger-bootstrap-ui default zh

Or use personalized quick settings, address bar quick settings access:

http://127.0.0.1:8888/doc.html?plus=1&cache=1&lang=en

lang values:中文(zh)、English(en)

被围观 人次
Last Updated: 11/7/2019, 3:29:34 PM