Sorry.
Forgot to attach instructions.

>I've developed an XSL stylesheet for automation of i18n dictionary updates
>and new language addition. The file is attached. Brief usage pattern, e.g.
>to correct Spanish translation is attached too. Later, I'll add
instructions
>to xdocs.

Regards,
    Konstantin Piroumian.



Usage pattern for dictionary generator stylesheet.
=====================================================================

Desciption is given for a real world example:
To correct/add Spanish translation in/to an existing dictionary:

1. Key generation
------------------

Generate a dictionary with keys and placeholders for Spanish translations. 
Optionaly, for one of the languages existing translations can be kept. 
To do it set stylesheet params (manually in stylesheet or in command-line):
        mode = keys (indicates, that only keys must be in result)   
        new-lang = es (language to be added)
        keep-lang = en (language to be kept in result, for convenience)
    
Command line for Xalan (Of course, Xerces and Xalan must be in your classpath): 
>java org.apache.xalan.xslt.Process -IN simple_dict.xml -XSL merge.xsl -OUT 
>simple_dict_es.xml -PARAM mode keys -PARAM new-lang es -PARAM keep-lang en

This will create a file simple_dict_es.xml with entries, keys and placeholders.

2. Translation.
------------------
Replace placeholders with translation according to the keys or original
translations, if they were kept during generation.

3. Add to the original dictionary.
----------------------------------
(Note. This step will be unnecessary when multiple dictionary
support will be implemented. Hope, this will be soon)

Use the same stylesheet for this purpose with this params:
        mode = merge
        new-lang = es
        new-dict = simple_dict_es.xml
        
Command line for Xalan: 
>java org.apache.xalan.xslt.Process -IN simple_dict.xml -XSL merge.xsl -OUT 
>simple_dict_new.xml -PARAM mode merge -PARAM new-lang es -PARAM new-dict 
>simple_dict_es.xml

4. Contacts
---------------
For any questions, feel free to contact me by [EMAIL PROTECTED]
Konstantin Piroumian.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to