/usr/share/perl5/Date/Manip/Lang.pod is in libdate-manip-perl 6.25-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | # Copyright (c) 1995-2011 Sullivan Beck. All rights reserved.
# This program is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
=pod
=head1 NAME
Date::Manip::Lang - date manipulation routines (language initialization)
=head1 DESCRIPTION
This module is a series of routines, one per language, used to
initialize the support for different languages in Date::Manip
=head1 ADDING A LANGUAGE
Adding a language is easily done. If you want to add a language,
refer to the files in module that live in: lib/Date/Manip/Lang .
First, send me the name of the language (in ASCII character) as well
as any locale designations.
For example, to create a Spanish translation (which is not necessary
since it already exists), I need the following list::
spanish es es_es
The first word is the name of the language. Copy copy the english.pm
file to spanish.pm.
The language file you just created is a new module containing the data
for that language. It needs to be modified in the following ways:
=over 4
=item
Change "english" to "spanish" everywhere it appears in the new file.
Also change "English" to "Spanish".
=item
Look for a line of the form:
@Encodings = qw();
and change it to include the encodings most often used by this
language. For example,
@Encodings = qw(utf-8 iso-8859-1 perl);
Always include 'utf-8' and 'perl' as the first and last elements in the list.
=item
Change all of the data (after the __DATA__ line) as described below.
=back
The data section of the module (which is written in YAML) is fairly
straightforward to translate.
Where possible, please store all data in UTF-8 characters. If you have
to escape high-byte characters, or use some other character encoding,
please let me know. I'll do my best to deal with it, but it will delay
me incorporating the translation into the module.
Most of the sections below can contain any number of alternate words
which imply the same thing. Any time a list contains multiple words,
the first should be the 'preferred' or most common word.
If a word contains UTF-8 characters which have a simple ASCII
equivalent, you should include both forms. For example, the spanish
name for Saturday in ASCII would be written sabado, but in reality,
the first 'a' has an accent over it. This word should appear
twice... first in full UTF-8 encoding, and second as all ASCII. If the
language (Russian for example) has no ASCII equivalent, just include
the UTF-8 representation.
=over 4
=item ampm
The ampm section consists of two lists of words. The first section are
words which can be included after a time to designate a morning time
(i.e. AM). The second set are words which designate an afternoon time
(i.e. PM).
=item at
The word 'at' as it appears in the phrase:
AT 3:00
=item day_abb, day_char, day_name
These are each a list of seven elements which refer to the days Monday
through Sunday.
day_char is typically a one or two character designation of the day
(M, T, W, ...).
day_abb is an abbreviation for the day (Mon, Tue, Wed, ...).
day_name is the full day name (Monday, Tuesday, ...).
=item each
This is a list of words that could be used to translate the following
phrases:
EACH Monday
EVERY Monday
EVERY month
=item fields
These are the names of the fields in a delta. There are 7 fields:
years, months, weeks, days, hours, minutes, seconds.
The first field would be the ways that you might name the years field:
YEARS YEAR YRS YR
=item last
This is a list of words that could be used to translate the following
phrase:
LAST day of the month
=item mode
This contains two lists of words which can be used to specify whether
a delta is exact, approximate, or business.
The first list contains words which would specify exact or approximate
deltas. In other words, a delta could be specified:
in EXACTLY 3 hours
in APPROXIMATELY 3 hours
The second list contains words which would specify business deltas. In
other words:
in 3 BUSINESS days
=item month_abb, month_name
These specify the abbreviation and name respectively of the 12 months.
=item nextprev
This contains two sets of words. The first specifies the next element,
and would be used to translate the following phrases:
NEXT week
NEXT Tuesday
The second set specifies the previous element, and would be used to
translate the following phrases:
LAST Tuesday
PREVIOUS week
=item nth
This contains the numbers from 1-53. The first element should be the
equivalent of '1st', '2nd', Additional elements should be the equivalent
of the number spelled out (one, two, ...) and the ordinal number
spelled out (first, second, ...).
=item of
This is a word which might be used to translate the following phrases:
1st dat OF December
1st day IN December
=item offset_date
This actually contains a hash, rather than a list.
Most languages have special words which refer to a day relative to today.
The most common (in English) are:
TODAY
TOMORROW
YESTERDAY
The keys of the hash are the words, and the values of the hash are a
delta which can be used to get the date relative to today.
For example, tomorrow is the delta '+0:0:0:1:0:0:0'.
If the word contains UTF-8 characters, please include it twice, once with
the UTF-8 characters, and once as ASCII (if relevant).
=item offset_time
This is a hash similar to offset_date.
Most languages have words which might refer to times relative to the
current time. In English, the only common word is
NOW
but in other languages, there may be other common words.
=item on
This is a word which might be used to translate the following phrases:
ON July 5th
=item times
This is a hash similar to offset_date.
Most languages have special words which refer to specific times of the
day. In English, these include:
NOON
MIDNIGHT
=item when
This is two lists of words. The first list would be in a delta referring to
a time in the past. For example:
5 hours AGO
5 hours EARLIER
The second list of words would be in a delta referring to a time in the
future. For example:
IN 5 hours
5 hours LATER
=back
=head1 SEE ALSO
Date::Manip - main module documentation
=head1 LICENSE
This script is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
=head1 AUTHOR
Sullivan Beck (sbeck@cpan.org)
=cut
|