Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Bedework i18n, Apereo 2013

Bedework i18n, Apereo 2013

Discussion of internationalization support and possible futures for the Bedework Enterprise Calendar System. Presented at Apereo 2013, San Diego.

Video presentation available at http://lanyrd.com/2013/apereo/schtyd/

#apereo13

Arlen Johnson

June 04, 2013
Tweet

More Decks by Arlen Johnson

Other Decks in Technology

Transcript

  1. INTERNATIONALIZATION Copyright Arlen D.H. Johnson 2013. This work is the

    intellectual property of the author. Permission is granted for this material to be shared for non-commercial, educational purposes, provided that this copyright statement appears on the reproduced materials and notice is given that the copying is by permission of the author. To disseminate otherwise or to republish requires written permission from the authors. Arlen Johnson Rensselaer Polytechnic Institute Apereo Conference June 4, 2013
  2. Bedework and i18n FRONT END (supported!) • Internationalized web client

    themes – The "frame" that holds the content – Dates and times (delivered by Java) BACK END • Internationalized data (supported, but not implemented in UI!) – Content: titles and descriptions for • Events • Locations • Contacts • Categories • Etc… • Logs (unsupported) 2 yet!
  3. 4 Bedework Front-End • XML-based J2EE web applications built in

    the MVC framework • Separate business logic from presentation and presentation from content content design business logic MVC XML HTML RSS JSON XML … JSP Java XSLT We use this architecture with our web clients even when calling resources via AJAX
  4. 5 Our Design Approach • Easy to change look and

    feel • Easy to change strings and locale settings • XSLT files live on the web “outside” our applications and are called over http and cached • We don’t need to rebuild or redeploy an application to change its appearance, deploy a new skin, or modify translations • Can be accessed by regular web designers Templates Images CSS XSLT HTML
  5. 6 Locale is set first Browser type (by user agent)

    set second Skin set last • Browser type and skin can be set in the request • Fall back to default if not found • Want to select locale explicitly too (easy but not done) Skin file Includes: • globals.xsl • localeSettings.xsl • strings.xsl • root of theme (e.g. bedework.xsl) The root stylesheet of a theme includes all the other theme files, e.g. header.xsl, event.xsl, etc. The globals.xsl file pulls in messages.xsl and errors.xsl from a central library (for all web clients) This folder is the “appRoot” of a calendar suite named “MainCampus” Selecting the Locale & Skin for Theming Bedework
  6. Pros & Cons • PROS – Works great!! – Easy

    to change the strings – Easy to accommodate locale specific needs – Don’t have to rebuild or redeploy! Just have to send a request to flush the cache! • CONS – Holy cow that’s a lot of directories to maintain... kind of baroque – and lots of duplicate files (oh no!) – Central library of messages and errors kept in yet another location 7
  7. Quirks • Common xsl and javascript libraries – shared by

    the web clients – must manage their own translations independently in a different place • JavaScript libraries often have their own translations (which is generally ok) – but sometimes, there are locale settings that must be configured specifically for each library - that's what the localeSettings.xsl file is for • Messages and errors from the back end that don't go through the XSL front end aren't i18n – mostly impacts log files or messages from web services (for developers) 8
  8. Possibilities • Could use properties files – could construct the

    strings.xsl files for the web clients during deploy – allows us to internationalize messages from back end to web clients, web services, and logs – Allows us to keep all strings files in a central repository – almost certainly easier to maintain! • Could also change underlying structure to reduce duplicate files and better organize the strings files in a common place • Probably should do both 9
  9. Definite To Dos • Enable content translation in the UI!

    – for all enabled locales – Note that this is independent of the theme translation issues altogether, and should be straightforward – it just needs to be exposed in the UI with a locale switch when editing an entity! (e.g. an event, contact, location, category, view, etc.) 10