You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Objective:

To localize the Date Picker field to a specific language

เมื่อต้องการแปลฟิลด์ตัวใช้เลือกวันที่เป็นภาษาเฉพาะ

Example 1:

The example below uses "zh-CN".

You can download the i18n jQuery library for Date Picker from http://code.google.com/p/listr/source/browse/#svn%2Ftrunk%2Flistr%2Flib%2Fjs%2Fui%2Fi18n.

ตัวอย่างด้านล่างใช้ "zh-CN"

คุณสามารถดาวน์โหลดไลบรารี่ i18n jQuery สำหรับตัวใช้เลือกวันที่ได้จาก http://code.google.com/p/listr/source/browse/#svn%2Ftrunk%2Flistr%2Flib%2Fjs%2Fuis%2Fuis

<script type="text/javascript" src="http://listr.googlecode.com/svn/trunk/listr/lib/js/ui/i18n/ui.datepicker-zh-CN.js" ></script>
<script type="text/javascript">
  $(document).ready(function(){
    $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
  });
</script> 


Example 2:

The next example uses French "fr"

  1. Search for a jQuery Date Pickerfor French i.e https://gist.github.com/corsonr/4306287#file-jquery-ui-datepicker-fr-js
  2. download the file
  3. upload said file to the relevant app. Design App > Properties & Export > Add Resource
  4. Click the file in the Resource tab and take note of its hash variable (for example it would be something like #appResource.jquery.ui.datepicker-fr.js#)
  5. Then where the Date Pickeris located, drag and drop the custom HTML and paste the following code 
<script type="text/javascript" src="#appResource.jquery.ui.datepicker-fr.js#"></script>
<script type="text/javascript">
  $(document).ready(function(){
    $.datepicker.setDefaults($.datepicker.regional['fr']);
  });
</script> 
  • No labels