Remove inscrutable TODO, optionalize another.
[htmlpurifier.git] / docs / proposal-language.txt
blob149701cd31b178a6cef4b11a262be048e06216d5
1 We are going to model our I18N/L10N off of MediaWiki's system.  Their's is
2 obviously quite complicated, so we're going to simplify it a bit for our needs.
4 == Caching ==
6 MediaWiki has lots of caching mechanisms built in, which make the code somewhat
7 more difficult to understand.  Before doing any loading, MediaWiki will check
8 the following places to see if we can be lazy:
10 1. $mLocalisationCache[$code] -  just a variable where it may have been stashed
11 2. serialized/$code.ser -  compiled serialized language file
12 3. Memcached version of file (with expiration checking)
14 Expiration checking consists of by ensuring all dependencies have filemtime
15 that match the ones bundled with the cached copy. Similar checking could be
16 implemented for serialized versions, as it seems that they are not updated
17 until manually recompiled.
19 == Behavior ==
21 Things that are localizable:
23 -  Weekdays (and abbrev)
24 -  Months (and abbrev)
25 -  Bookstores
26 -  Skin names
27 -  Date preferences / Custom date format
28 -  Default date format
29 -  Default user option overrides
30 -+ Language names
31 -  Timezones
32 -+ Character encoding conversion via iconv
33 -  UpperLowerCase first (needs casemaps for some)
34 -  UpperLowerCase
35 -  Uppercase words
36 -  Uppercase word breaks
37 -  Case folding
38 -  Strip punctuation for MySQL search
39 -  Get first character
40 -+ Alternate encoding
41 -+ Recoding for edit (and then recode input)
42 -+ RTL
43 -+ Direction mark character depending on RTL
44 -? Arrow depending on RTL
45 -  Languages where italics cannot be used
46 -+ Number formatting (commafy, transform digits, transform separators)
47 -  Truncate (multibyte)
48 -  Grammar conversions for inflected languages
49 -  Plural transformations
50 -  Formatting expiry times
51 -  Segmenting for diffs (Chinese)
52 -  Convert to variants of language
53 -  Language specific user preference options
54 -  Link trails [[foo]]bar
55 -+ Language code (RFC 3066)
57 Neat functionality:
59 -  I18N sprintfDate
60 -  Roman numeral formatting
62 Items marked with a + likely need to be addressed by HTML Purifier
64     vim: et sw=4 sts=4