Skip to content

Commit

Permalink
#19 Add Thai locale + fix README.md typo (#28)
Browse files Browse the repository at this point in the history
* Add Thai locale
* Fix README.md typo
  • Loading branch information
gowza authored and hustcc committed Sep 12, 2016
1 parent e3fec23 commit 551411e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ HTML code:
js code
```js
// use render to render it realtime
timeago().render(document.querySelectorAll('.need_to_be_render'), 'zh_CN');
timeago().render(document.querySelectorAll('.need_to_be_rendered'), 'zh_CN');
// or cancel realtime render
timeago().cancel()
```
Expand Down
18 changes: 18 additions & 0 deletions locales/th.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = function(number, index) {
return [
['เมื่อสักครู่นี้', 'อีกสักครู่'],
['%s วินาทีที่แล้ว', 'ใน %s วินาที'],
['1 นาทีที่แล้ว', 'ใน 1 นาที'],
['%s นาทีที่แล้ว', 'ใน %s นาที'],
['1 ชั่วโมงที่แล้ว', 'ใน 1 ชั่วโมง'],
['%s ชั่วโมงที่แล้ว', 'ใน %s ชั่วโมง'],
['1 วันที่แล้ว', 'ใน 1 วัน'],
['%s วันที่แล้ว', 'ใน %s วัน'],
['1 อาทิตย์ที่แล้ว', 'ใน 1 อาทิตย์'],
['%s อาทิตย์ที่แล้ว', 'ใน %s อาทิตย์'],
['1 เดือนที่แล้ว', 'ใน 1 เดือน'],
['%s เดือนที่แล้ว', 'ใน %s เดือน'],
['1 ปีที่แล้ว', 'ใน 1 ปี'],
['%s ปีที่แล้ว', 'ใน %s ปี']
][index];
}

0 comments on commit 551411e

Please sign in to comment.