[xwiki-devs] [Proposal] Internationalizing XWiki Applications

Thomas Mortagne thomas.mortagne at xwiki.com
Thu Sep 20 16:12:56 CEST 2007


Hi,

The new Application Manager
(http://www.xwiki.org/xwiki/bin/view/Code/WikiManagerApplication) support
resource bundle translation page list by application.

We can use it so that $msg("mykey") :
 - search in applications containing the current document
 - then applications dependencies
 - then resource bundle registered in XWiki.XWikiPreferences
 - and finish with static resource bundle files


vmassol wrote:
> 
> Hi,
> 
> Here's my proposal for internationalizing XWiki apps. The idea is to  
> propose several solutions for XWiki apps writers:
> 
> * Use case 1: I have lots of text on my page
>    - solution: use XWiki's mechanism for translating page by creating  
> several editions of the page in the different languages
> 
> * Use case 2: I want translation resources for my application only  
> and I'd like to share resources between pages
>    - solution: use:  $msg("mykey",  
> "MySpace.MyTranslationDocForThisApplication")
>    - MySpace.MyTranslationDocForThisApplication is a standard  
> document to which a XWiki.PropertiesClass object is attached
>    - It'll search first in that doc's PropertiesClass and if not  
> found in XWiki's registered document bundles and if not there in  
> XWiki's static resource bundle files
> 
> * Use case 3: I want translation resources only for a given page
>    - solution: use:  $msg("mykey", $doc)
>    - You'll need to have attached a PropertieClass object to the page  
> where $msg is used
>    - It'll search first in that object and if not found in XWiki's  
> registered document bundles and if not there in XWiki's static  
> resource bundle files
> 
> * Use case 4: I want to have a global translation resources for all  
> my apps in the wiki
>    - solution: use:  $msg("mykey")
>    - You'll need to have created ad registered resource bundle  
> documents in the Wiki preferences
>    - It'll search first in XWiki's registered document bundles and if  
> not there in XWiki's static resource bundle files
> 
> Implementation details:
> 
> * Add XWikiMessageTool.get(String, String) API
> * Add XWiki.PropertiesClass class in XE in the Administration  
> Application + a class sheet for presenting the properties nicely
> 
> WDYT?
> 
> Thanks
> -Vincent
> 
> 
> 
> 
> --
> You receive this message as a subscriber of the xwiki-dev at objectweb.org
> mailing list.
> To unsubscribe: mailto:xwiki-dev-unsubscribe at objectweb.org
> For general help: mailto:sympa at objectweb.org?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> 
> 

--
Thomas Mortagne
-- 
View this message in context: http://www.nabble.com/-Proposal--Internationalizing-XWiki-Applications-tf4088373.html#a12798074
Sent from the XWiki- Dev mailing list archive at Nabble.com.



More information about the devs mailing list