-
Notifications
You must be signed in to change notification settings - Fork 60
week11
= 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 is multilanguage, if he 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 different from an observer to an other. For instance, css validator has a parameter named but our calculator observer has a parameter named .BR
'''2. Solution'''
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
- Creation of new template (xx_index.html.vm) and addition of an hidden parameter ucn_lang which contain the language of the template choosen.
- Modification of the RDF contract file schema.
- Addition of 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 and .
- 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.
- [wiki:week1]
- [wiki:week2]
- [wiki:week3]
- [wiki:week4]
- [wiki:week5]
- [wiki:week6]
- [wiki:week7]
- [wiki:week8]
- [wiki:week9]
- [wiki:week10]
- Week 11 (01/14/2008 -> 01/18/2007)
- [wiki:week12]
- [wiki:week13]
- [wiki:week14]
Use an extra layer of security with two factor authentication (2FA) when logging into google