1 # Blosxom Plugin: date_translate
2 # Author(s): Rael Dornfest <rael@oreilly.com>
4 # Documentation: See the bottom of this file or type: perldoc date_translate
6 package date_translate;
8 # --- Configurable variables -----
10 # A list of properly encoded month names in the language of your choice
11 my @months = qw! 00 Janvier Février Mars Avril Mai Juin Juillet Août Septembre Octobre Novembre Décembre !;
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' );
16 # --------------------------------
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
26 my ($pkg, $path, $date_ref, $mtime, @date_bits) = @_;
28 $dw = $daysoftheweek{$date_bits[0]};
29 $mo = $months[$date_bits[2]];
40 Blosxom Plug-in: date_translate
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.
53 Version number coincides with the version of Blosxom with which the
54 current version was first bundled.
58 Rael Dornfest <rael@oreilly.com>, http://www.raelity.org/
62 Blosxom Home/Docs/Licensing: http://www.raelity.org/apps/blosxom/
64 Blosxom Plugin Docs: http://www.raelity.org/apps/blosxom/plugin.shtml
68 Address bug reports and comments to the Blosxom mailing list
69 [http://www.yahoogroups.com/group/blosxom].
73 Blosxom and this Blosxom Plug-in
74 Copyright 2003, Rael Dornfest
76 Permission is hereby granted, free of charge, to any person obtaining a
77 copy of this software and associated documentation files (the "Software"),
78 to deal in the Software without restriction, including without limitation
79 the rights to use, copy, modify, merge, publish, distribute, sublicense,
80 and/or sell copies of the Software, and to permit persons to whom the
81 Software is furnished to do so, subject to the following conditions:
83 The above copyright notice and this permission notice shall be included
84 in all copies or substantial portions of the Software.
86 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
87 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
88 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
89 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
90 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
91 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
92 OTHER DEALINGS IN THE SOFTWARE.