下面是我的html代码...与.js集成,我想在右上角添加多语言选项。如果有人可以在代码中添加它将是伟大的。我为lex做了这个,我没有HTML经验。这也捕获了音频,如果有人可以建议用多语言改变音频,这将是非常棒的。 `
<html>
<head>
<!-- Font Dependencies -->
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons" rel="stylesheet" type="text/css">
<!-- Vuetify CSS Dependencies -->
<link href="https://unpk`enter code here`g.com/vuetify@0.16.9/dist/vuetify.min.css" rel="stylesheet" type="text/css">
<!-- LexWebUi CSS from dist directory -->
<link href="./lex-web-ui.css" rel="stylesheet" type="text/css">
<!-- page specific LexWebUi styling -->
<style type="text/css">
#lex-web-ui-app { display: flex; height: 100%; width: 100%; }
body, html { overflow-y: auto; overflow-x: hidden; }
</style>
</head>
<body>
<!-- application will be dynamically mounted here -->
<div id="lex-web-ui"></div>
<!--
Vue, Vuex, Vuetifiy and AWS SDK dependencies must be loaded before lex-web-ui.js.
Loading from third party CDN for quick testing
-->
<script src="https://unpkg.com/vue@2.5.3"></script>
<script src="https://unpkg.com/vuex@3.0.1"></script>
<script src="https://unpkg.com/vuetify@0.16.9"></script>
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.149.0.min.js"></script>
<!-- LexWebUi Library from dist directory -->
<script src="./lex-web-ui.js"></script>
<!-- instantiate the web ui with a basic config -->
<script>
// LexWebUi supports numerous configuration options. Here
// is an example using just a couple of the required options.
var config = {
cognito: {
// Your Cognito Pool Id - this is required to provide AWS credentials
poolId: ''
},
lex: {
// Lex Bot Name in your account
botName: 'demo'
}
};
// load the LexWebUi component
var lexWebUi = new LexWebUi.Loader(config);
// instantiate Vue
new Vue({
el: '#lex-web-ui',
store: lexWebUi.store,
template: '<div id="lex-web-ui-app"><lex-web-ui/></div>',
});
</script>
</body>
</html>
`
答案 0 :(得分:0)
RO_NO_TEXT_UPDATE =&#34;讯息为空,请重试。&#34;
class
。并将其包含在您的索引中。将其命名为:&#39;语言&#39; echo RDtext::_('RO_NO_TEXT_UPDATE')
将显示:&#34;消息为空,请重试。&#34; 当您在另一种语言文件中使用RO_NO_TEXT_UPDATE时,例如荷兰语,英语文本将被您的荷兰语给予否决:&#34; Bericht是leeg,探测者het opnieuw。&#34;
希望我能告诉您如何使其正常工作。
或者你可以让谷歌翻译工作,但这将为你的服务器带来很大的进步:https://packagist.org/packages/stichoza/google-translate-php
答案 1 :(得分:0)
试试这个谷歌翻译API。将其添加到您的网站 https://translate.google.com/manager/website/