在 Contact Form 7 中更改日期选择器的语言

Change Language Of Date Picker in Contact Form 7

我有一个翻译成两种语言的网站;英语和土耳其语。我想要 this turkish page to display the datepicker UI in the Turkish Language and not the default English Language. Clearly simply using two different forms does not solve the problem. I have tried solutions from this, this and even the demo 页面上的日期选择器,但我仍然遇到错误。所以要么我错误地应用了它们,要么遗漏了一些东西。我什至包含了来自 jQuery CDN 的语言源代码,下载了一个副本到服务器,但结果仍然不是积极的。 下面是当前代码,它没有像现在这样给出错误,但它仍然不起作用。

在联系表中:

    <tr><td>Tarih</td><td>:</td><td>[date* tarih id:tarih]</td></tr>

页面的 CSS head 标签。

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script data-require="jqueryui@*" data-semver="1.10.0" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.9.2/i18n/jquery.ui.datepicker-tr.min.js"></script>
<link data-require="jqueryui@*" data-semver="1.10.0" rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.0/css/smoothness/jquery-ui-1.10.0.custom.min.css" />
<script data-require="jqueryui@*" data-semver="1.10.0" src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.0/jquery-ui.js"></script>

Javascript

<script type="text/javascript">
    $(document).ready(function() {
      var options = $.extend(
        {},                                  
        $.datepicker.regional["tr"], 
        { dateFormat: "dd.mm.yy" } 
        );
        $.datepicker.setDefaults(options);
    });
  </script>

现代浏览器直接呈现日期选择器。更改您的浏览器语言以使用您当地的语言呈现数据选取器。