V1
V1

语言设置

ActiveReportJS 设置了多语言版本, 您可以添加文件来 ar-js-locales.js 设置 Viewer 的语言,比如需要显示中文,可以Viewer 的 Language 选项为 "zh",代码如下

<html style="height: 600px; font-size: 14px">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <link rel="stylesheet" type="text/css" href="styles/ar-js-viewer.css">
    <script type="text/javascript" src="scripts/ie-polyfills.js"></script>
    <script type="text/javascript" src="scripts/ar-js-core.js"></script>
    <script type="text/javascript" src="scripts/ar-js-viewer.js"></script>

    <!-- Added reference -->
    <script type="text/javascript" src="scripts/ar-js-locales.js"></script>

</head>

<body>
    <div id="arjsv" style="height: 600px;"></div>

    <script>
        var viewer;
        window.onload = function(){
            var options = {language:'zh'}; 
            viewer = new ActiveReports.Viewer(document.getElementById("arjsv"),options);
            viewer.open("reports/InvoiceList.rdlx-json");
        };
    </script>
</body>

</html>