Difference between revisions of "Localizable Views"

From Code4Lib
Jump to: navigation, search
(Specific example: XSLT)
m (Reverted edits by 207.35.173.123 (Talk); changed back to last version by Wickr)
Line 8: Line 8:
 
There are a variety of ways to accomplish this, depending on environment.  
 
There are a variety of ways to accomplish this, depending on environment.  
  
Shit!, and http://www.justin.tv/tacomawashingtnp/profile tacoma washington fast cash loans, and  =P, and http://www.justin.tv/fastcashpersoyh/profile fast cash personal loans, and  tar, and http://www.justin.tv/njfastcashperswe/profile njfastcash personal loans cash advance resources, and  =-P, and http://www.justin.tv/paydayloansahc/profile pay day loans available in ny, and  %-OO, and http://www.justin.tv/cashadvancepayn/profile cash advance payday loans, and >:))), and http://www.justin.tv/onlinecashadvbu/profile online cash advance payday loans comparison reviews, and  673, and http://www.justin.tv/badcreditnofre/profile bad credit no fax payday loans in 1 hour to, and  24574, and
+
== Specific example: XSLT ==
 +
 
 +
If your views are in [[XSLT]], the XSLT 'import' function provides a convenient method to allow over-riding of XSLT for localization.  
 +
 
 +
Put your XSLT that is distributed with the application in one directory or directory tree.  
 +
 
 +
Have another separate directory tree for local XSLT "overrides".  
 +
 
 +
When your application loads an XSLT file, it can first check to see if an XSLT file with the same name/pat exists in the 'local' directory. If so, it can combine the 'distribution' and the 'local' version of that XSLT file can be combined together using XSLT 'import' statement, so that any templates or variables in the 'local' version will override the distribution version.  
 +
 
 +
Application Example: Xerxes

Revision as of 16:32, 28 April 2009


There needs to be a way for local implementers to customize the 'templates' or 'views' to have, at a minimum, their own branding, without actually editing shared distribution code. Ideally, they should be able to customize as much as possible of the templates/views.

Localized templates/views should probably live in different directories than distributed templates/views, for ease of local source control.

There are a variety of ways to accomplish this, depending on environment.

Specific example: XSLT

If your views are in XSLT, the XSLT 'import' function provides a convenient method to allow over-riding of XSLT for localization.

Put your XSLT that is distributed with the application in one directory or directory tree.

Have another separate directory tree for local XSLT "overrides".

When your application loads an XSLT file, it can first check to see if an XSLT file with the same name/pat exists in the 'local' directory. If so, it can combine the 'distribution' and the 'local' version of that XSLT file can be combined together using XSLT 'import' statement, so that any templates or variables in the 'local' version will override the distribution version.

Application Example: Xerxes