Skip to content

alanpich/modTranslatedDocument

Repository files navigation

#modTranslatedDocument ##A translatable resource type for Modx Revolution 2.2+

modTranslatedDocument aims to be a full alternative to the native Document resource class in Modx. Documents using this class can offer translations of all text-based resource properties based on the cultureKey of the context in which they are requested.

This Extra is currently in a beta phase, and as such may behave unexpectedly.

  • Install through the MODx package manager

###Why a custom resource? After looking into the best solution for a multi-lingual microsite build in ModX, Babel seemed to be the only pre-packaged extra that was considered. A very robust package without doubt, but the idea of separating each translation of what, generally, is the same information into separate resources and contexts didn't sit right with me.

Why should what is, delivery language aside, supposedly the same information be split accross several nodes on what could be a rather large tree. An article exists to serve a piece of information or point of view to the world. If it is the same point of view or piece of information, it is (in the web's terms) the same resource, irregardless of the language it is delivered in.

As a result, this project aims to deliver a solution that will allow a resource to be translated into as many languages as are required while still maintaining a semantic resource tree.

##The Requirements

  1. Transparent delivery of correct language
  • *[[pagetitle]] should return a page title in the appropriate language, without additional snippet-ing.
  1. 3rd-party extras such as getResources should work transparently.
  2. Resource caching should not be compromised
  3. Translation management interfaces should feel native to the resource

Components

  • modTranslatedDocument custom resource class
  • TranslationsGateway plugin to assign correct cultureKey based on browser language and/or saved preference cookie

About

Translatable Resource type for Modx Revolution 2.2+

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published