Search code examples
codeigniterlocalizationinternationalizationglobalizationpyrocms

PyroCMS language support


Our custom modules in PyroCMS need to support multiple languages. How is this done? Particularly:

  1. Where do we put the language folders and files? We assume in /addons/<module name>/language/. Is this right?
  2. Must we provide a translation of our content (content that is specific to our modules) in all of the PyroCMS supported languages? For example, we are adding the "Gibberish" language and want to define "greeting" = "Gibberish Hello". Must we also define "greeting" in english, etc.?
  3. Conversely, must we also translate into "Gibberish" language the terms that PyroCMS supports? For example, the "English" translation "cp_title" = "Control Panel" must be translated into "cp_title" = "Gibberish Control Panel", etc.?
  4. Setting "?lang=zz" (where "zz" is the language we tried to add) gave us the following error:

    A PHP Error was encountered

    Severity: Notice

    Message: Undefined index: en

    Filename: core/MY_Controller.php

    Line Number: 83


Solution

  • I answered this on or forums, but once again: here is the documentation:

    http://docs.pyrocms.com/2.2/manual/developers/contributing/translating-language-files