I created a branch with my work so far:
http://gitorious.org/~candrews/laconica/candrews-clone/commits/notice_languages

All member of laconica-developers have been given commit access. So
*please* contribute with your awesome ideas :-)

So far, this is what I have:
Add a User_language table and corresponding class to store what languages
each user understands
New field in a notice that indicates what language the notice is in
User profile settings page allows to select which languages they understand
New notice form has a dropdown which allows the user to specify the
notice's language

Thanks,
~Craig

>> 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

Reply via email to