1

im trying to generate dynamically a calendar control with dojo 1.5 and set the calendar language to spanish, but with no luck. I tried using the lang:"es-es" with no luck among other things... here is the element:

<input type="text" constraints="{datePattern:'yyyy-MM-dd', strict:true}" name="$name"      id="$name" value="" dojotype="dijit.form.DateTextBox">";

thanks in advance!!!

4

1 回答 1

1

您需要在 dojo 配置上设置语言环境

<script src="path_to_dojo" 
    data-dojo-config="parseOnLoad: true, locale: 'es-es'" />

Dojo 1.5 -> http://jsfiddle.net/cswing/ecLn2/

道场 1.8 -> http://jsfiddle.net/cswing/5Mw8U/

http://dojotoolkit.org/reference-guide/1.8/quickstart/internationalization/specifying-locale.html#quickstart-internationalization-specifying-locale

于 2013-01-30T00:09:10.960 回答