On Donnerstag, 26. Februar 2009, Temlakos wrote:
> Here is a language file that conforms to the SMW 1.14.x standard. To
> build this, I checked out the current SMW source code from Subversion,
> opened the Spanish-language file, saved it as SMW_LanguagePt.php, and
> modified it with translations I received from a personal friend who
> speaks the language.

Great, thank you. The file works with the current development version of SMW 
as well, and I have now checked it into SVN.

There are two things that you may want to check/add:

(1) Since there is already Portuguese language in BetaWiki, your friend may 
want to check that both translations agree (especially, core notions like 
"property" do also appear in messages). I think there is no way to create our 
non-message language files from BetaWiki; this is why we have this strange 
setup where only 90% is translated online and you still need to send files to 
me.

(2) With the new date support, SMW includes translations of month names within 
its language file. They are not mandatory (English is always available), but 
they are useful (maybe you can even exploit them in your historic date code). 
The format is simple: two arrays for long and abbreviated names; German 
example below:

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");

In addition, we have an array with preferences for writing dates, controlling 
how ambiguous dates such as "10-11-12" are interpreted (the preferred order of 
components). This looks as follows by default:

protected $m_dateformats = array(array(SMW_Y), array(SMW_MY,SMW_YM), 
array(SMW_DMY,SMW_MDY,SMW_YMD,SMW_YDM));

These are the preferred interpretations for dates with 1, 2, and 3 components 
(time is not relevant here). 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. Let me know 
if you would like to change this for Portuguese.

-- Markus

>
> Markus, the previous version made reference to one of my custom
> datatypes and also used some obsolete special-property code references.
> This file uses the current special-property names and makes no
> extraneous datatype references. You may if you wish check this into
> Subversion (the 1_14 branch, where I obtained my originals).
>
> I built the Portuguese file because this friend is going to build a new
> Portuguese version of my wiki, and I wanted the proper language support
> for SMW.
>
> Temlakos


-- 
Markus Krötzsch
Semantic MediaWiki    http://semantic-mediawiki.org
http://korrekt.org    mar...@semantic-mediawiki.org

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to