3 # Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
5 # (Except where explictly superceded by other copyright notices)
7 # This work is made available to you under the terms of Version 2 of
8 # the GNU General Public License. A copy of that license should have
9 # been provided with this software, but in any event can be snarfed
12 # This work is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # Unless otherwise specified, all modifications, corrections or
18 # extensions to this work which alter its source code become the
19 # property of Best Practical Solutions, LLC when submitted for
20 # inclusion in the work.
24 package RT::I18N::i_default;
30 eval "require RT::I18N::i_default_Vendor";
31 die $@ if ($@ && $@ !~ qr{^Can't locate RT/I18N/i_default_Vendor.pm});
32 eval "require RT::I18N::i_default_Local";
33 die $@ if ($@ && $@ !~ qr{^Can't locate RT/I18N/i_default_Local.pm});
39 This class just zero-derives from the project base class, which
40 is English for this project. i-default is "English at least". It
41 wouldn't be a bad idea to make our i-default messages be English
42 plus, say, French -- i-default is meant to /contain/ English, not
43 be /just/ English. If you have all your English messages in
44 Whatever::en and all your French messages in Whatever::fr, it
45 would be straightforward to define Whatever::i_default's as a subclass
46 of Whatever::en, but for every case where a key gets you a string
47 (as opposed to a coderef) from %Whatever::en::Lexicon and
48 %Whatever::fr::Lexicon, you could make %Whatever::i_default::Lexicon
49 be the concatenation of them both. So: "file '[_1]' not found.\n" and
50 "fichier '[_1]' non trouve\n" could make for an
51 %Whatever::i_default::Lexicon entry of
52 "file '[_1]' not found\nfichier '[_1]' non trouve.\n".
54 There may be entries, however, where that is undesirable.
55 And in any case, it's not feasable once you have an _AUTO lexicon
56 in the mix, as wo do here.
64 When human-readable text must be presented in a context where the
65 sender has no knowledge of the recipient's language preferences (such
66 as login failures or E-mailed warnings, or prior to language
67 negotiation), text SHOULD be presented in Default Language.
69 Default Language is assigned the tag "i-default" according to the
70 procedures of RFC 1766. It is not a specific language, but rather
71 identifies the condition where the language preferences of the user
72 cannot be established.
74 Messages in Default Language MUST be understandable by an English-
75 speaking person, since English is the language which, worldwide, the
76 greatest number of people will be able to get adequate help in
77 interpreting when working with computers.
79 Note that negotiating English is NOT the same as Default Language;
80 Default Language is an emergency measure in otherwise unmanageable
83 In many cases, using only English text is reasonable; in some cases,
84 the English text may be augumented by text in other languages.