Add first-pass rss20 plugin.
[matthijs/upstream/blosxom-plugins.git] / general / date_translate
1 # Blosxom Plugin: date_translate
2 # Author(s): Rael Dornfest <rael@oreilly.com> 
3 # Version: 2.0b2
4 # Documentation: See the bottom of this file or type: perldoc date_translate
5
6 package date_translate;
7
8 # --- Configurable variables -----
9
10 # A list of properly encoded month names in the language of your choice
11 my @months = qw! 00 Janvier F&#233;vrier Mars Avril Mai Juin Juillet Ao&#251;t Septembre Octobre Novembre D&#233;cembre !;
12
13 # A list of properly encoded day names in the language of your choice
14 my %daysoftheweek = ( Mon=>'Lundi', Tue=>'Mardi', Wed=>'Mercredi', Thu=>'Jeudi', Fri=>'Vendredi', Sat=>'Samedi', Sun=>'Dimanche' );
15
16 # --------------------------------
17
18 $dw; # use $date_translate::dw for translated week day in flavour templates
19 $mo; # use $date_translate::mo for translated month name in flavour templates
20
21 sub start {
22   1;
23 }
24
25 sub date {
26   my ($pkg, $path, $date_ref, $mtime, @date_bits) = @_;
27
28   $dw = $daysoftheweek{$date_bits[0]};
29   $mo = $months[$date_bits[2]];
30
31   1;
32 }
33
34 1;
35
36 __END__
37
38 =head1 NAME
39
40 Blosxom Plug-in: date_translate
41
42 =head1 SYNOPSIS
43
44 Purpose: Populates $date_translate::dw (day of the week) and 
45 $date_translate::mo (month name) with translated versions of the
46 default English $dw and $mo.  Default is French; alter in the 
47 Configurable variables section below.
48
49 =head1 VERSION
50
51 2.0b2
52
53 Version number coincides with the version of Blosxom with which the 
54 current version was first bundled.
55
56 =head1 AUTHOR
57
58 Rael Dornfest  <rael@oreilly.com>, http://www.raelity.org/
59
60 This plugin is now maintained by the Blosxom Sourceforge Team,
61 <blosxom-devel@lists.sourceforge.net>.
62
63 =head1 SEE ALSO
64
65 Blosxom Home/Docs/Licensing: http://blosxom.sourceforge.net/
66
67 Blosxom Plugin Docs: http://blosxom.sourceforge.net/documentation/users/plugins.html
68
69 =head1 BUGS
70
71 None known; please send bug reports and feedback to the Blosxom
72 development mailing list <blosxom-devel@lists.sourceforge.net>.
73
74 =head1 LICENSE
75
76 Blosxom and this Blosxom Plug-in
77 Copyright 2003, Rael Dornfest 
78
79 Permission is hereby granted, free of charge, to any person obtaining a
80 copy of this software and associated documentation files (the "Software"),
81 to deal in the Software without restriction, including without limitation
82 the rights to use, copy, modify, merge, publish, distribute, sublicense,
83 and/or sell copies of the Software, and to permit persons to whom the
84 Software is furnished to do so, subject to the following conditions:
85
86 The above copyright notice and this permission notice shall be included
87 in all copies or substantial portions of the Software.
88
89 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
90 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
91 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
92 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
93 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
94 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
95 OTHER DEALINGS IN THE SOFTWARE.