|Version 13 (modified by dtea, 6 years ago)|
WEEK 11 : 01/14/2008 -> 01/18/2008
Internalization is done. Now, we are going to explain mechanism of the internalization and how we have done it.
1. Objective ant problematic
Some observers can give a response in different languages, for example css validator. The objective is to offer, to user, possibility to choose a language from unicorn's interface. This possibility is already offered by css validator ( http://jigsaw.w3.org/css-validator/validator.html).
List of languages user can choose is matched to the different templates' languages. Consequently language of the template for the response will be the one the user has choosen.
On the other hand, language response can be different according to the observer. Actually some observers have a lang parameter, others take language from http header and others have a single language. To be in adequacy with language user has choosen, we want to tell to the observer the response's language to choose.
The problem is we don't know if an observer has or not a language parameter and, if he has one, we don't know its name. Actually the name of this parameter can be diferent from an observer to an other. For instance, css validator has a parameter named lang but our calculator observer has a parameter named clang.
The idea is to define in the observer's contrat (RDF file) the name of the parameter which define language (if the observer has one) and to add this parameter in the url of the request. Modify the RDF file involve to modify the schema (Observer.rdfs).
3. Steps of devlopment
- Modification of the RDF contract file schema.
- Addition of <ucn:lang> node to the contract to define name of the lang parameter (we have done test with our calculator observer).
- Modification of RDF file parser (RDFContractUnmarshallerJena.java) to get text between <ucn:lang> and </ucn:lang>.
- Addition in Observer.java of an attribut which contain the name of the lang parameter.
- Modification of Framework.java to set name of the lang parameter of the observer after unmarshalling.
- Modification of UnicornCall? to add parameter lang and its value in th map of parameter.
5. Modify observer's RDF contract file
- Week 1 (10/15/2007 -> 10/19/2007)
- Week 2 (10/22/2007 -> 10/26/2007)
- Week 3 (10/29/2007 -> 11/02/2007)
- Week 4 (11/05/2007 -> 11/09/2007)
- Week 5 (11/12/2007 -> 11/23/2007)
- Week 6 (11/26/2007 -> 11/30/2007)
- Week 7 (12/03/2007 -> 12/07/2007)
- Week 8 (12/10/2007 -> 12/14/2007)
- Week 9 (12/17/2007 -> 12/21/2007)
- Week 10 (01/07/2008 -> 01/11/2008)
- Week 11 (12/17/2007 -> 12/21/2007)