Customization"
From Documentation
Line 2: | Line 2: | ||
= Customize More Event Link = | = Customize More Event Link = | ||
+ | If there is not enough space to show events in one day, Calendar will show a "more event" link: | ||
+ | [[File:moreEventLink.png | center]] | ||
+ | |||
+ | The default text is from a javascript object. | ||
<source lang='javascript'> | <source lang='javascript'> | ||
msgcal.dayMORE = "+{0} more"; | msgcal.dayMORE = "+{0} more"; | ||
msgcal.monthMORE = "+{0} more"; | msgcal.monthMORE = "+{0} more"; | ||
</source> | </source> | ||
+ | |||
+ | To provide a different locale of text or override the text, you need to create a javascript file and load it. For example, | ||
+ | |||
+ | '''msgcal_zh.js''' | ||
+ | <source lang='javascript'> | ||
+ | zk.afterLoad('calendar', function() { | ||
+ | msgcal = {}; | ||
+ | msgcal.dayMORE = "+{0} 事件"; | ||
+ | msgcal.monthMORE = "+{0} 事件"; | ||
+ | });//zk.afterLoad | ||
+ | </source> | ||
+ | |||
+ | Then load the script with [[ZK_Developer%27s_Reference/Internationalization/Warning_and_Error_Messages#Defined_in_a_JS_File | land-addon.xml]] | ||
{{ZKCalendarEssentialsHeadingToc}} | {{ZKCalendarEssentialsHeadingToc}} | ||
{{ZKCalendarEssentialsPageFooter}} | {{ZKCalendarEssentialsPageFooter}} |
Revision as of 02:31, 26 September 2018
Customize More Event Link
If there is not enough space to show events in one day, Calendar will show a "more event" link:
The default text is from a javascript object.
msgcal.dayMORE = "+{0} more";
msgcal.monthMORE = "+{0} more";
To provide a different locale of text or override the text, you need to create a javascript file and load it. For example,
msgcal_zh.js
zk.afterLoad('calendar', function() {
msgcal = {};
msgcal.dayMORE = "+{0} 事件";
msgcal.monthMORE = "+{0} 事件";
});//zk.afterLoad
Then load the script with land-addon.xml
Subsections:
The example project is at Github