check out how this plugin detects language
http://gitorious.org/~everplays/laconica/rtl-fixes/blobs/master/plugins/DirectionDetectorPlugin.php

i think supporting for utf8 & ascii is enough because it's standard of w3
& it can handle any language

> ----- Original Message -----
> From: "Craig Andrews" <[email protected]>
> To: "Craig Andrews" <[email protected]>
> Cc: [email protected]
> Subject: Re: [Laconica-dev] Indicating the language of a notice
> Date: Thu, 3 Sep 2009 22:54:46 -0400
> 
> 
> > I would like to see a notice has a new field saved with in the database:
> > it's language. A notice's language is set by (first match wins):
> > 1. Language hash tag (#.en #.fr etc)
> > 2. API provided meta data (or web interface selection)
> > 3. "Language" selection from the user's profile
> >
> > This way, multilingual users can override the language of a particular
> > notice per notice.
> >
> > I'd also like to see (and this could certainly come later) a way for a
> > user to indicate what languages they understand, then filter all notices
> > in languages they don't understand from them (so when I'm logged in,
> > notices in Chinese don't appear in the public stream, and StatusNet never
> > sends me XMPP messages from my friends speaking Hindi).
> 
> I'm starting to implement this approach.
> 
> 1. What languages should we offer? I'm thinking of storing a 2 letter
> ISO-639-1 code with each notice (or NULL, if we don't know). This means
> there is no difference between "English (UK)" and "English (US)" which I
> think is the right way to go. Anyone disagree?
> 
> 2. On the profile settings page, I'm putting a list of checkboxes, one for
> each language. The user checks the box next to the languages they
> understand.
> 
> 3. Next to the notice posting text box, *if* the user has multiple
> languages checked, I'm putting a drop down box where the user can select
> the language for that notice, defaulted to the primary language they
> selected on the profile settings page (the drop down that is already
> there). If the user only selected one language in their settings, there is
> no change to notice posting (no drop down is added).
> 
> 4. I'm adding a new, optional parameter to the 'statuses/update' API
> method named 'language' which takes a ISO-639-1 2 letter language code. If
> no language is specified, and the user has only 1 language selected, that
> language will be set on the notice. If the user understands more than 1
> language and no language is specific, NULL will be set on the notice.
> 
> 5. For notices posted by other means (XMPP, Twitter bridge, email, etc)
> I'll use the same rules as above: if the user has only 1 language
> selected, that language will be set on the notice. If the user understands
> more than 1 language and no language is specific, NULL will be set on the
> notice.
> 
> 6. I'm adding a new database table with this schema:
> create table user_language (
>      user_id integer not null comment 'user understanding the language'
> references user (id),
>      language    char(2) not null comment 'language understood'
>      constraint primary key (user_id, language)
> );
> 
> Thoughts?
> 
> ~Craig
> 
> _______________________________________________
> Laconica-dev mailing list
> [email protected]
> http://mail.laconi.ca/mailman/listinfo/laconica-dev

>


-- 
You Rock! Your E-Mail Should Too! Signup Now at Rock.com and get 250MB of 
Storage!

http://webmail.rock.com/signup/
_______________________________________________
Laconica-dev mailing list
[email protected]
http://mail.laconi.ca/mailman/listinfo/laconica-dev

Reply via email to