Markus, Fabian, and everyone:Attached is a patch that will add appropriate code to all the files in the /languages directory for which I was able to provide language-appropriate month names and symbols for calendars and twelve-hour annotations for the latest version of SMW_DV_Time.php. I have carefully scrubbed this patch of any references either to my old custom data type or to any language file that SMW does /not/ have by default.
This patch contains lists of month names (including several that did not previously exist in some of the files), am/pm symbols, calendar symbols, and regular expressions for finding these symbols. The patch also contains some namespace translations that had not been previously provided, and in at least one case, an extensive list of English aliases.
The file SMW_Language.php contains definitions of the necessary functions, and defaults for the returned variables.
When this patch is applied, the internationalization of SMW_DV_Time.php will work.
Temlakos
Only in .: languages.patch diff -au ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageDe.php ./SMW_LanguageDe.php --- ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageDe.php 2009-02-25 20:48:16.000000000 -0500 +++ ./SMW_LanguageDe.php 2009-08-14 19:26:51.000000000 -0400 @@ -25,6 +25,7 @@ * "printout statement" --> Ausgabeanweisung * * @author Markus Krötzsch + * @author Terry A. Hurlbut * @ingroup SMWLanguage * @ingroup Language */ @@ -118,6 +120,24 @@ protected $m_months = array("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"); -protected $m_monthsshort = array("Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"); +protected $m_monthsshort = array("Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"); + +protected $m_monthsAM = array("Aviv", "Siw", "Sivan", "Tammus", "Aw", "Elul", "Etanim","Bul","Kislew","Tevet","Schevat","Adar"); + +protected $m_monthsshortAM = array("Avi", "Siw", "Siv", "Tam", "Aw", "Elu", "Eta","Bul","Kis","Tev","Sch","Ada"); + +protected $m_monthsH = array("Nisan", "Ijjar", "Siwan", "Tammus", "Aw", "Elul", "Tischri", "Cheschwan", "Kislew", "Tevet", "Schevat", "Adar", "WeAdar"); + +protected $m_monthsshortH = array("Nis", "Ijj", "Siw", "Tam", "Aw", "Elu", "Tis", "Che", "Kis", "Tev", "Sch", "Ada", "Wea"); + +protected $m_ampm = array("am" => "am", "pm" => "pm"); + +protected $m_rgxampm = "/\040[ap]m/u"; + +protected $m_calendar = array("AD" => "AD", "AM" => "AM", "BC" => "AC", "BCE" => "vdZ", "CE" => "vuZ", + "Gr" => "Gr", "He" => "He", "JD" => "JD", "Jl" => "Jl", "MJD" => "MJD", "OS" => "OS"); + +protected $m_rgxcalendar = "/(A[CDM]|Gr|He|Jl|(M)?JD|OS|v[du]Z)/u"; + } diff -au ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageEn.php ./SMW_LanguageEn.php --- ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageEn.php 2009-02-25 20:50:02.000000000 -0500 +++ ./SMW_LanguageEn.php 2009-08-14 18:48:46.000000000 -0400 @@ -18,6 +18,7 @@ * English language labels for important SMW labels (namespaces, datatypes,...). * * @author Markus Krötzsch + * @author Terry A. Hurlbut * @ingroup SMWLanguage * @ingroup Language */ @@ -80,6 +81,23 @@ protected $m_monthsshort = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); +protected $m_monthsAM = array("Abib", "Zif", "Sivan", "Tammuz", "Av", "Elul", "Ethanim","Bul","Kislev","Teveth","Shevat","Adar"); + +protected $m_monthsshortAM = array("Abi", "Zif", "Siv", "Tam", "Av", "Elu", "Eth","Bul","Kis","Tev","She","Ada"); + +protected $m_monthsH = array("Nisan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Cheshvan", "Kislev", "Teveth", "Shevat", "Adar", "Veadar"); + +protected $m_monthsshortH = array("Nis", "Iya", "Siv", "Tam", "Av", "Elu", "Tis", "Che", "Kis", "Tev", "She", "Ada", "Vea"); + +protected $m_ampm = array("am" => "am", "pm" => "pm"); + +protected $m_rgxampm = "/\040[ap]m/u"; + +protected $m_calendar = array("AD" => "AD", "AM" => "AM", "BC" => "BC", "BCE" => "BCE", "CE" => "CE", + "Gr" => "Gr", "He" => "He", "JD" => "JD", "Jl" => "Jl", "MJD" => "MJD", "OS" => "OS"); + +protected $m_rgxcalendar = "/(A[DM]|BC(E)?|CE|Gr|He|Jl|(M)?JD|OS)/u"; + } diff -au ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageEs.php ./SMW_LanguageEs.php --- ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageEs.php 2009-02-25 20:51:20.000000000 -0500 +++ ./SMW_LanguageEs.php 2009-08-14 19:30:24.000000000 -0400 @@ -17,6 +17,7 @@ * Spanish language labels for important SMW labels (namespaces, datatypes,...). * * @author Javier Calzada Prado, Carmen Jorge GarcÃa-Reyes, Universidad Carlos III de Madrid, Jesús Espino GarcÃa + * @author Terry A. Hurlbut * @ingroup SMWLanguage * @ingroup Language */ @@ -88,8 +90,8 @@ SMW_NS_PROPERTY_TALK => "Discusión_atributo", SMW_NS_TYPE => "Tipos_de_datos", SMW_NS_TYPE_TALK => "Discusión_tipos_de_datos", - SMW_NS_CONCEPT => 'Concept', // TODO: translate - SMW_NS_CONCEPT_TALK => 'Concept_talk' // TODO: translate + SMW_NS_CONCEPT => 'Concepto', + SMW_NS_CONCEPT_TALK => 'Discusión_concepto' ); protected $m_NamespaceAliases = array( @@ -104,6 +106,26 @@ 'Concept_talk' => SMW_NS_CONCEPT_TALK ); -} +protected $m_dateformats = array(array(SMW_Y), array(SMW_MY,SMW_YM), array(SMW_MDY,SMW_DMY,SMW_YMD,SMW_YDM)); + +protected $m_months = array("enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"); + +protected $m_monthsshort = array("ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic"); + +protected $m_monthsAM = array("abib", "ziv", "sivan", "tamuz", "av", "elul", "etanim","bul","kislev","tevet","shevat","adar"); + +protected $m_monthsshortAM = array("abi", "ziv", "siv", "tam", "av", "elu", "eta","bul","kis","tev","she","ada"); +protected $m_monthsH = array("nisán", "iyar", "siván", "tamuz", "av", "elul", "tishrei", "jeshván", "kislev", "tevet", "shevat", "adar", "veadar"); + +protected $m_monthsshortH = array("nis", "iya", "siv", "tam", "av", "elu", "tis","jes","kis","tev","she","ada", "vea"); +protected $m_ampm = array("am" => "am", "pm" => "pm"); + +protected $m_rgxampm = "/\040[ap]m/u"; + +protected $m_calendar = array("AD" => "dC", "AM" => "AM", "BC" => "aC", "BCE" => "AEC", "CE" => "EC", + "Gr" => "Gr", "He" => "He", "JD" => "JD", "Jl" => "Jl", "MJD" => "MJD", "OS" => "OS"); + +protected $m_rgxcalendar = "/(A(EC|M)|[Ead]C|Gr|He|Jl|(M)?JD|OS)/u"; +} diff -au ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageFr.php ./SMW_LanguageFr.php --- ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageFr.php 2009-02-25 20:56:07.000000000 -0500 +++ ./SMW_LanguageFr.php 2009-08-14 19:48:43.000000000 -0400 @@ -17,6 +17,7 @@ * French language labels for important SMW labels (namespaces, datatypes,...). * * @author Pierre Matringe + * @author Terry A. Hurlbut * @ingroup SMWLanguage * @ingroup Language */ @@ -105,6 +107,28 @@ 'Concept_talk' => SMW_NS_CONCEPT_TALK ); -} +protected $m_dateformats = array(array(SMW_Y), array(SMW_MY,SMW_YM), array(SMW_MDY,SMW_DMY,SMW_YMD,SMW_YDM)); + +protected $m_months = array("janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"); + +protected $m_monthsshort = array("jan", "fév", "mar", "avr", "mai", "jun", "jul", "aoû", "sep", "oct", "nov", "déc"); + +protected $m_monthsAM = array("Aviv", "Zif", "Sivan", "Tammouz", "Av", "Elloul", "Ethanim","Boul","Kislev","Tébeth","Schébat","Adar"); + +protected $m_monthsshortAM = array("Avi", "Zif", "Siv", "Tam", "Av", "Ell", "Eth","Bou","Kis","Téb","Sch","Ada"); + +protected $m_monthsH = array("Nissan", "Iyar", "Sivan", "Tammouz", "Av", "Elloul", "Tisseri", "Heshvan", "Kislev", "Tébeth", "Schébat", "Adar", "Veadar"); + +protected $m_monthsshortH = array("Nis", "Iya", "Siv", "Tam", "Av", "Ell", "Tis","Hes","Kis","Téb","Sch","Ada", "Vea"); +protected $m_ampm = array("am" => "am", "pm" => "pm"); +protected $m_rgxampm = "/\040[ap]m/u"; + +protected $m_calendar = array("AD" => "ApJ-C", "AM" => "AM", "BC" => "AvJ-C", "BCE" => "AEC", "CE" => "EC", + "Gr" => "Gr", "He" => "He", "JD" => "JJ", "Jl" => "Jl", "MJD" => "JJM", "OS" => "OS"); + +protected $m_rgxcalendar = "/A((E|[pv]J-)C|M)|EC|Gr|He|J(J(M)?|l)|OS/u"; + + +} diff -au ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageIt.php ./SMW_LanguageIt.php --- ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageIt.php 2009-02-25 20:59:34.000000000 -0500 +++ ./SMW_LanguageIt.php 2009-08-14 20:12:57.000000000 -0400 @@ -18,6 +18,7 @@ * * @author Davide Eynard * @author David Laniado + * @author Terry A. Hurlbut * @ingroup SMWLanguage * @ingroup Language */ @@ -46,6 +47,18 @@ 'Intero' => '_num', 'Enumeration' => '_str', 'Enumerazione'=> '_str' + // support English aliases: + 'Page' => '_wpg', + 'String' => '_str', + 'Text' => '_txt', + 'Boolean' => '_boo', + 'Number' => '_num', + 'Geographic coordinate' => '_geo', + 'Temperature' => '_tem', + 'Date' => '_dat', + 'Email' => '_ema', + 'Annotation URI' => '_anu' ); protected $m_SpecialProperties = array( @@ -65,16 +78,49 @@ ); protected $m_Namespaces = array( // TODO: translate (English aliases can be kept, see other language files - SMW_NS_RELATION => 'Relation', - SMW_NS_RELATION_TALK => 'Relation_talk', - SMW_NS_PROPERTY => 'Property', - SMW_NS_PROPERTY_TALK => 'Property_talk', - SMW_NS_TYPE => 'Type', - SMW_NS_TYPE_TALK => 'Type_talk', - SMW_NS_CONCEPT => 'Concept', - SMW_NS_CONCEPT_TALK => 'Concept_talk' + SMW_NS_RELATION => 'Relazione', + SMW_NS_RELATION_TALK => 'Discussione_relazione', + SMW_NS_PROPERTY => 'Proprietà ', + SMW_NS_PROPERTY_TALK => 'Discussione_proprietà ', + SMW_NS_TYPE => 'Tipo', + SMW_NS_TYPE_TALK => 'Discussione_tipo', + SMW_NS_CONCEPT => 'Concetto', + SMW_NS_CONCEPT_TALK => 'Discussione_concetto' ); -} +protected $m_NamespaceAliases = array( + // support English aliases for namespaces + 'Relation' => SMW_NS_RELATION, + 'Relation_talk' => SMW_NS_RELATION_TALK, + 'Property' => SMW_NS_PROPERTY, + 'Property_talk' => SMW_NS_PROPERTY_TALK, + 'Type' => SMW_NS_TYPE, + 'Type_talk' => SMW_NS_TYPE_TALK, + 'Concept' => SMW_NS_CONCEPT, + 'Concept_talk' => SMW_NS_CONCEPT_TALK +); + +protected $m_dateformats = array(array(SMW_Y), array(SMW_MY,SMW_YM), array(SMW_MDY,SMW_DMY,SMW_YMD,SMW_YDM)); + +protected $m_months = array("Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"); + +protected $m_monthsshort = array("Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"); + +protected $m_monthsAM = array("Abib", "Ziv", "sivan", "tamuz", "av", "elul", "Ethanim","Bul","kislev","tevet","shevat","adar"); +protected $m_monthsshortAM = array("Abi", "Ziv", "siv", "tam", "av", "elu", "Eth","Bul","kis","tev","she","ada"); +protected $m_monthsH = array("Nisan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishri", "Cheshvan", "Kislev", "Tevet", "Shevat", "Adar", "Veadar"); + +protected $m_monthsshortH = array("Nis", "Iya", "Siv", "Tam", "Av", "Elu", "Tis","Che","Kis","Tev","She","Ada", "Vea"); + +protected $m_ampm = array("am" => "am", "pm" => "pm"); + +protected $m_rgxampm = "/\040[ap]m/u"; + +protected $m_calendar = array("AD" => "dC", "AM" => "AM", "BC" => "aC", "BCE" => "aev", "CE" => "ev", + "Gr" => "Gr", "He" => "Eb", "JD" => "JD", "Jl" => "Gl", "MJD" => "MJD", "OS" => "OS"); + +protected $m_rgxcalendar = "/(AM|[ad]C|(a)?ev|Eb|G[lr]|(M)?JD|OS)/u"; + +} diff -au ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageKo.php ./SMW_LanguageKo.php --- ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageKo.php 2009-02-25 21:01:24.000000000 -0500 +++ ./SMW_LanguageKo.php 2009-08-14 20:17:47.000000000 -0400 @@ -113,6 +113,23 @@ 'Concept' => SMW_NS_CONCEPT, 'Concept_talk' => SMW_NS_CONCEPT_TALK ); +protected $m_dateformats = array(array(SMW_Y), array(SMW_MY,SMW_YM), array(SMW_MDY,SMW_DMY,SMW_YMD,SMW_YDM)); + +protected $m_months = array("1 ì", "2 ì", "3 ì", "4 ì", "5 ì", "6 ì", "7 ì", "8 ì", "9 ì", "10 ì", "11 ì", "12 ì"); + +protected $m_monthsshort = array("1 ì", "2 ì", "3 ì", "4 ì", "5 ì", "6 ì", "7 ì", "8 ì", "9 ì", "10 ì", "11 ì", "12 ì"); + +protected $m_monthsAM = array("1 ì", "2 ì", "3 ì", "4 ì", "5 ì", "6 ì", "7 ì", "8 ì", "9 ì", "10 ì", "11 ì", "12 ì"); + +protected $m_monthsshortAM = array("1 ì", "2 ì", "3 ì", "4 ì", "5 ì", "6 ì", "7 ì", "8 ì", "9 ì", "10 ì", "11 ì", "12 ì"); + +protected $m_monthsH = array("1 ì", "2 ì", "3 ì", "4 ì", "5 ì", "6 ì", "7 ì", "8 ì", "9 ì", "10 ì", "11 ì", "12 ì", "13 ì"); + +protected $m_monthsshortH = array("1 ì", "2 ì", "3 ì", "4 ì", "5 ì", "6 ì", "7 ì", "8 ì", "9 ì", "10 ì", "11 ì", "12 ì", "13 ì"); + +protected $m_ampm = array("am" => "ì¤ì ", "pm" => "ì¤í"); + +protected $m_rgxampm = "/\040ì¤[ì í]/u"; } diff -au ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageNl.php ./SMW_LanguageNl.php --- ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageNl.php 2009-02-25 21:03:25.000000000 -0500 +++ ./SMW_LanguageNl.php 2009-08-14 20:20:50.000000000 -0400 @@ -17,6 +17,7 @@ * Dutch language labels for important SMW labels (namespaces, datatypes,...). * * @author Siebrand Mazeland + * @author Terry A. Hurlbut * @ingroup SMWLanguage * @ingroup Language */ @@ -104,4 +105,27 @@ 'Concept_talk' => SMW_NS_CONCEPT_TALK ); +protected $m_dateformats = array(array(SMW_Y), array(SMW_MY,SMW_YM), array(SMW_MDY,SMW_DMY,SMW_YMD,SMW_YDM)); + +protected $m_months = array("januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"); + +protected $m_monthsshort = array("jan", "feb", "maa", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"); + +protected $m_monthsAM = array("abib", "ziv", "siewan", "tammoez", "aaw", "elloel", "etanim","bul","kisleew", "teweet", "sjewat", "adar"); + +protected $m_monthsshortAM = array("abi", "ziv", "sie", "tam", "aaw", "ell", "eta","bul","kis","tew","sje","ada"); + +protected $m_monthsH = array("niesan", "ijar", "siewan", "tammoez", "aaw", "elloel", "tisjrie", "chesjwan", "kisleew", "teweet", "sjewat", "adar", "veadar"); + +protected $m_monthsshortH = array("nie", "ija", "sie", "tam", "aaw", "ell", "tis","che","kis","tew","sje","ada", "vea"); + +protected $m_ampm = array("am" => "am", "pm" => "pm"); + +protected $m_rgxampm = "/\040[ap]m/u"; + +protected $m_calendar = array("AD" => "nChr", "AM" => "AM", "BC" => "vChr", "BCE" => "vdj", "CE" => "gj", + "Gr" => "Gr", "He" => "He", "JD" => "JD", "Jl" => "Jl", "MJD" => "MJD", "OS" => "OS"); + +protected $m_rgxcalendar = "/(AM|[nv]Chr|(vd|g)j|Gr|He|Jl|(M)?JD|OS)/u"; + } diff -au ../../SemanticMediaWiki-1.5bSVN/languages/SMW_Language.php ./SMW_Language.php --- ../../SemanticMediaWiki-1.5bSVN/languages/SMW_Language.php 2009-02-25 19:48:53.000000000 -0500 +++ ./SMW_Language.php 2009-08-14 17:17:34.000000000 -0400 @@ -14,6 +14,7 @@ /** * Base class for all SMW language classes. * @author Markus Krötzsch + * @author Terry A. Hurlbut * @ingroup SMWLanguage * @ingroup Language */ @@ -32,10 +33,33 @@ /// Twelve strings briefly naming the months. English is always supported in Type:Date, so /// the default is simply empty (no labels in addition to English) protected $m_monthsshort = array(); + /// Twelve strings naming the Biblical months. English is always supported in Type:Date, so + /// the default is simply empty (no labels in addition to English) + protected $m_monthsAM = array(); + /// Twelve strings briefly naming the Biblical months. English is always supported in Type:Date, so + /// the default is simply empty (no labels in addition to English) + protected $m_monthsshortAM = array(); + /// Thirteen strings naming the Hillel months. English is always supported in Type:Date, so + /// the default is simply empty (no labels in addition to English) + protected $m_monthsH = array(); + /// Thirteen strings briefly naming the Hillel months. English is always supported in Type:Date, so + /// the default is simply empty (no labels in addition to English) + protected $m_monthsshortH = array(); /// Preferred interpretations for dates with 1, 2, and 3 components. There is an array for /// each case, and the constants define the obvious order (e.g. SMW_YDM means "first Year, /// then Day, then Month). Unlisted combinations will not be accepted at all. protected $m_dateformats = array(array(SMW_Y), array(SMW_MY,SMW_YM), array(SMW_DMY,SMW_MDY,SMW_YMD,SMW_YDM)); + /// Two strings used as annotations for the twelve-hour clock convention. Most languages do not + /// observe such a convention. American English is supported in Type:Date, so that by + /// default the symbol for "am" is "am" and for "pm", "pm". + protected $m_ampm = array("am" => "am", "pm" => "pm"); + /// A regex for searching for an am/pm annotation. Default is the English version. + protected $m_rgxampm = "/\040[ap]m/u"; + /// Several strings naming the calendars and distinguishing AD/CE from BC/BCE. + protected $m_calendar = array("AD" => "AD", "AM" => "AM", "BC" => "BC", "BCE" => "BCE", "CE" => "CE", + "Gr" => "Gr", "He" => "He", "JD" => "JD", "Jl" => "Jl", "MJD" => "MJD", "OS" => "OS"); + /// A regex for searching for a calendar symbol. Default is the English version. + protected $m_rgxcalendar = "/(A[DM]|BC(E)?|CE|Gr|He|Jl|(M)?JD|OS)/u"; /** @@ -107,12 +131,105 @@ } /** + * As above, but for Biblical (AM) months + */ + function findMonthAM($label) { + $id = array_search($label, $this->m_monthsAM); + if ($id !== false) { + return $id+1; + } + $id = array_search($label, $this->m_monthsshortAM); + if ($id !== false) { + return $id+1; + } + return false; + } + /** + * As above, but for Hillel II (H) months. + */ + function findMonthH($label) { + $id = array_search($label, $this->m_monthsH); + if ($id !== false) { + return $id+1; + } + $id = array_search($label, $this->m_monthsshortH); + if ($id !== false) { + return $id+1; + } + return false; + } + /** * Return the name of the month with the given number. */ function getMonthLabel($number) { return (($number>=1)&&($number<=12))?$this->m_months[(int)($number-1)]:''; } + /** + * Return the name of the Biblical (AM) month with the given number. + */ + function getMonthLabelAM($number) { + return (($number>=1)&&($number<=12))?$this->m_monthsAM[(int)($number-1)]:''; + } + /** + * Return the name of the Hillel II (H) month with the given number. + */ + function getMonthLabelH($number) { + return (($number>=1)&&($number<=13))?$this->m_monthsH[(int)($number-1)]:''; + } + + /** + * Function translates a language-specific am/pm note into its English equivalent, + * if necessary. + */ + function findAmPm($label) { + $id = array_search($label, $this->m_ampm); + if ($id !== false) { + return $id; + } + return false; + } + + /** + * Return the language-specific equivalent of an internally-used am/pm label. + */ + function getAmPmLabel ($symbol) { + return (($symbol=="am")||($symbol=="pm"))?$this->m_ampm[$symbol]:''; + } + + /** + * Return the language-specific regex for searching for an am/pm label + */ + function getRgxAmPm() { + return $this->m_rgxampm; + } + /** + * Function translates a language-specific calendar symbol into its English equivalent. + */ + function findCalendar($label) { + $id = array_search($label, $this->m_calendar); + if ($id !== false) { + return $id; + } + return false; + } + + /** + * Return the language-specific equivalent of an internally-used calendar symbol. + */ + function getCalendar ($symbol) { + return (($symbol=="AD")||($symbol=="BC")||($symbol=="CE")||($symbol=="BCE")||($symbol=="OS") + || ($symbol == "Gr") || ($symbol == "Jl") || ($symbol == "AM")||($symbol == "He") + || ($symbol == "JD") || ($symbol == "MJD")) ? $this->m_calendar[$symbol]:''; + } + + /** + * Return the language-specific regex for searching for a calendar symbol. + */ + function getRgxCalendar() { + return $this->m_rgxcalendar; + } + } diff -au ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguagePl.php ./SMW_LanguagePl.php --- ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguagePl.php 2009-02-25 21:04:52.000000000 -0500 +++ ./SMW_LanguagePl.php 2009-08-14 20:26:23.000000000 -0400 @@ -35,6 +35,7 @@ * on this site = w tym miejscu * * @author Åukasz Bolikowski + * @author Terry A. Hurlbut * @version 0.2 * @ingroup SMWLanguage * @ingroup Language @@ -125,6 +126,29 @@ 'Concept_talk' => SMW_NS_CONCEPT_TALK ); +protected $m_dateformats = array(array(SMW_Y), array(SMW_MY,SMW_YM), array(SMW_MDY,SMW_DMY,SMW_YMD,SMW_YDM)); + +protected $m_months = array("styczeÅ", "luty", "marsz", "kwiecieÅ", "maj", "czerwiec", "lipiec", "sierpieÅ", "wrzesieÅ", "październik", "listopad", "grudzieÅ"); + +protected $m_monthsshort = array("sty", "lut", "mar", "kwi", "maj", "cze", "lip", "sie", "wrz", "paź", "lis", "gru"); + +protected $m_monthsAM = array("Abib", "Siw", "Sivan", "Tamuz", "Aw", "Elul", "Etanim","Bul","Kislew","Tewet","Szewat","Adar"); + +protected $m_monthsshortAM = array("Abi", "Siw", "Siv", "Tam", "Aw", "Elu", "Eta","Bul","Kis","Tew","Sze","Ada"); + +protected $m_monthsH = array("Nisan", "Ijar", "Siwan", "Tamuz", "Aw", "Elul", "Tiszri", "Cheszwan", "Kislew", "Tewet", "Szewat", "Adar", "Weadar"); + +protected $m_monthsshortH = array("Nis", "Ija", "Siw", "Tam", "Aw", "Elu", "Tis","Che","Kis","Tew","Sze","Ada", "Wea"); + +protected $m_ampm = array("am" => "am", "pm" => "pm"); + +protected $m_rgxampm = "/\040[ap]m/u"; + +protected $m_calendar = array("AD" => "ad", "AM" => "AM", "BC" => "pc", "BCE" => "pne", "CE" => "ne", + "Gr" => "Gr", "He" => "He", "JD" => "JD", "Jl" => "Jl", "MJD" => "MJD", "OS" => "OS"); + +protected $m_rgxcalendar = "/(AM|ad|pc|(p)?ne|Gr|He|Jl|(M)?JD|OS)/u"; + } diff -au ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguagePt.php ./SMW_LanguagePt.php --- ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguagePt.php 2009-02-25 20:29:09.000000000 -0500 +++ ./SMW_LanguagePt.php 2009-08-14 20:30:15.000000000 -0400 @@ -16,7 +16,8 @@ /** * Portuguese language labels for important SMW labels (namespaces, datatypes,...). * - * @author SemÃramis Herszon, Terry A. Hurlbut + * @author SemÃramis Herszon + * @author Terry A. Hurlbut * @ingroup SMWLanguage * @ingroup Language */ @@ -105,6 +106,29 @@ 'Concept_talk' => SMW_NS_CONCEPT_TALK ); +protected $m_dateformats = array(array(SMW_Y), array(SMW_MY,SMW_YM), array(SMW_MDY,SMW_DMY,SMW_YMD,SMW_YDM)); + +protected $m_months = array("Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"); + +protected $m_monthsshort = array("Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"); + +protected $m_monthsAM = array("Abib", "Zive", "Sivan", "Tamuz", "Av", "Elul", "Etanim","Bul","Kislev","Tevet","Shevat","Adar"); + +protected $m_monthsshortAM = array("Abi", "Ziv", "Siv", "Tam", "Av", "Elu", "Eta","Bul","Kis","Tev","She","Ada"); + +protected $m_monthsH = array("Nissan", "Iyar", "Sivan", "Tamuz", "Av", "Elul", "Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar", "Veadar"); + +protected $m_monthsshortH = array("Nis", "Iya", "Siv", "Tam", "Av", "Elu", "Tis","Che","Kis","Tev","She","Ada", "Vea"); + +protected $m_ampm = array("am" => "am", "pm" => "pm"); + +protected $m_rgxampm = "/\040[ap]m/u"; + +protected $m_calendar = array("AD" => "dC", "AM" => "AM", "BC" => "aC", "BCE" => "AEC", "CE" => "EC", + "Gr" => "Gr", "He" => "He", "JD" => "JD", "Jl" => "Jl", "MJD" => "MJD", "OS" => "OS"); + +protected $m_rgxcalendar = "/(A(EC|M)|[Ead]C|Gr|He|Jl|(M)?JD|OS)/u"; + } diff -au ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageRu.php ./SMW_LanguageRu.php --- ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageRu.php 2009-02-25 21:06:00.000000000 -0500 +++ ./SMW_LanguageRu.php 2009-08-14 20:36:54.000000000 -0400 @@ -17,6 +17,7 @@ * Russian language labels for important SMW labels (namespaces, datatypes,...). * * @author Dmitry Khoroshev cn...@uniyar.ac.ru + * @author Terry A. Hurlbut * @ingroup SMWLanguage * @ingroup Language */ @@ -106,5 +107,27 @@ 'Concept' => SMW_NS_CONCEPT, 'Concept_talk' => SMW_NS_CONCEPT_TALK ); +protected $m_dateformats = array(array(SMW_Y), array(SMW_MY,SMW_YM), array(SMW_MDY,SMW_DMY,SMW_YMD,SMW_YDM)); + +protected $m_months = array("ÑнваÑÑ","ÑевÑалÑ","маÑÑа","апÑелÑ", "маÑ","иÑнÑ","иÑлÑ","авгÑÑÑа","ÑенÑÑÑбÑÑ", "окÑÑбÑÑ","ноÑбÑÑ","декабÑÑ"); + +protected $m_monthsshort = array("Ñнв","Ñев","маÑ","апÑ", "маÑ","иÑн","иÑл","авг","Ñен", "окÑ","ноÑ","дек"); + +protected $m_monthsAM = array("авива", "зиÑа", "ÑиванÑ", "ÑаммÑза", "ава", "eлÑлÑ", "eиÑанима","бÑлÑ","Ñ Ð¸Ñлева","ÑeвeÑа", "ÑеваÑа","адаÑÑ"); + +protected $m_monthsshortAM = array"ави", "зиÑ", "Ñив", "Ñам", "ава", "eлÑ", "eиÑ","бÑл","Ñ Ð¸Ñ","Ñeв", "Ñев","ада"); + +protected $m_monthsH = array("ниÑанÑ", "ийаÑÑ", "ÑиванÑ", "ÑаммÑза", "ава", "eлÑлÑ", "ÑиÑÑeиÑ", "Ñ eÑ Ð²Ð°Ð½Ñ", "киÑлева", "ÑeвeÑа", "ÑеваÑа","адаÑÑ", "вeадаÑÑ"); + +protected $m_monthsshortH = array("ниÑ", "ийа", "Ñив", "Ñам", "ава", "eлÑ", "ÑиÑ", "Ñ eÑ ", "киÑ", "Ñeв", "Ñев","ада", "вeа"); + +protected $m_ampm = array("am" => "пн", "pm" => "пд"); + +protected $m_rgxampm = "/\040п[нд]/u"; + +protected $m_calendar = array("AD" => "РХ", "AM" => "ÐÐ", "BC" => "ÐÐ¥", "BCE" => "пнÑ", "CE" => "нÑ", + "Gr" => "Gr", "He" => "Ðв", "JD" => "JD", "Jl" => "Юл", "MJD" => "MJD", "OS" => "OS"); + +protected $m_rgxcalendar = "/(ÐÐ|[ÐÐ ]Ð¥|(п)?нÑ|ÐÑ|Ðв|Юл|(M)?JD|OS)/u"; } diff -au ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageZh_cn.php ./SMW_LanguageZh_cn.php --- ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageZh_cn.php 2009-02-25 19:48:52.000000000 -0500 +++ ./SMW_LanguageZh_cn.php 2009-08-14 20:53:59.000000000 -0400 @@ -109,5 +109,26 @@ 'Concept' => SMW_NS_CONCEPT, 'Concept_talk' => SMW_NS_CONCEPT_TALK ); +protected $m_dateformats = array(array(SMW_Y), array(SMW_MY,SMW_YM), array(SMW_MDY,SMW_DMY,SMW_YMD,SMW_YDM)); +protected $m_months = array("1æ", "2æ", "3æ", "4æ", "5æ", "6æ", "7æ", "8æ", "9æ", "10æ", "11æ", "12æ"); + +protected $m_monthsshort = array("1æ", "2æ", "3æ", "4æ", "5æ", "6æ", "7æ", "8æ", "9æ", "10æ", "11æ", "12æ"); + +protected $m_monthsAM = array("1æ", "2æ", "3æ", "4æ", "5æ", "6æ", "7æ", "8æ", "9æ", "10æ", "11æ", "12æ"); + +protected $m_monthsshortAM = array("1æ", "2æ", "3æ", "4æ", "5æ", "6æ", "7æ", "8æ", "9æ", "10æ", "11æ", "12æ"); + +protected $m_monthsH = array( "1æ", "2æ", "3æ", "4æ", "5æ", "6æ", "7æ", "8æ", "9æ", "10æ", "11æ", "12æ"); + +protected $m_monthsshortH = array("1æ", "2æ", "3æ", "4æ", "5æ", "6æ", "7æ", "8æ", "9æ", "10æ", "11æ", "12æ"); + +protected $m_ampm = array("am" => "ä¸å", "pm" => "ä¸å"); + +protected $m_rgxampm = "/\040[ä¸ä¸]å/u"; + +protected $m_calendar = array("AD" => "å ¬å ", "AM" => "é¿æ¦æ¼è¿ª", "BC" => "å ¬å å", + "Gr" => "å ¬å", "He" => "å¸ä¼¯ä¾æ", "JD" => "JD", "Jl" => "åç¥æ", "MJD" => "MJD", "OS" => "OS"); + +protected $m_rgxcalendar = "/(å ¬(å|å (å)?)|é¿æ¦æ¼è¿ª|(å¸ä¼¯ä¾|åç¥)æ|(M)?JD|OS)/u"; } diff -au ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageZh_tw.php ./SMW_LanguageZh_tw.php --- ../../SemanticMediaWiki-1.5bSVN/languages/SMW_LanguageZh_tw.php 2009-02-25 19:48:53.000000000 -0500 +++ ./SMW_LanguageZh_tw.php 2009-08-14 20:54:06.000000000 -0400 @@ -107,8 +107,28 @@ 'Concept' => SMW_NS_CONCEPT, 'Concept_talk' => SMW_NS_CONCEPT_TALK ); +protected $m_dateformats = array(array(SMW_Y), array(SMW_MY,SMW_YM), array(SMW_MDY,SMW_DMY,SMW_YMD,SMW_YDM)); +protected $m_months = array("1æ", "2æ", "3æ", "4æ", "5æ", "6æ", "7æ", "8æ", "9æ", "10æ", "11æ", "12æ"); +protected $m_monthsshort = array("1æ", "2æ", "3æ", "4æ", "5æ", "6æ", "7æ", "8æ", "9æ", "10æ", "11æ", "12æ"); + +protected $m_monthsAM = array("1æ", "2æ", "3æ", "4æ", "5æ", "6æ", "7æ", "8æ", "9æ", "10æ", "11æ", "12æ"); + +protected $m_monthsshortAM = array("1æ", "2æ", "3æ", "4æ", "5æ", "6æ", "7æ", "8æ", "9æ", "10æ", "11æ", "12æ"); + +protected $m_monthsH = array( "1æ", "2æ", "3æ", "4æ", "5æ", "6æ", "7æ", "8æ", "9æ", "10æ", "11æ", "12æ"); + +protected $m_monthsshortH = array("1æ", "2æ", "3æ", "4æ", "5æ", "6æ", "7æ", "8æ", "9æ", "10æ", "11æ", "12æ"); + +protected $m_ampm = array("am" => "ä¸å", "pm" => "ä¸å"); + +protected $m_rgxampm = "/\040[ä¸ä¸]å/u"; + +protected $m_calendar = array("AD" => "å ¬å ", "AM" => "é¿æ¦æ¼è¿ª", "BC" => "å ¬å å", + "Gr" => "å ¬å", "He" => "å¸ä¼¯ä¾æ", "JD" => "JD", "Jl" => "åç¥æ", "MJD" => "MJD", "OS" => "OS"); + +protected $m_rgxcalendar = "/(å ¬(å|å (å)?)|é¿æ¦æ¼è¿ª|(å¸ä¼¯ä¾|åç¥)æ|(M)?JD|OS)/u"; }
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel