PyroCMS language support

Our custom modules in PyroCMS must support multiple languages. How it's done? In particular:

  • Where do we put language folders and files? Suppose in /addons/<module name>/language/ . Is it correct?
  • Should we provide a translation of our content (content that relates to our modules) in all languages ​​supported by PyroCMS? For example, we add the language "Gibberish" and want to define "greeting" = "Gibberish Hello" . Should we also define "greeting" in English, etc.?
  • Conversely, do you need to translate the terms supported by PyroCMS into the Gibberish language? For example, the "English" translation of "cp_title" = "Control Panel" should be translated into "cp_title" = "Gibberish Control Panel" , etc.?
  • Setting "? Lang = zz" (where "zz" is the language we tried to add) caused the following error:

    PHP error occurred

    Severity Level: Note

    Message: Undefined index: ru

    File Name: core / MY_Controller.php

    Line Number: 83

+4
source share
2 answers

I answered this either in the forums, but again: here is the documentation:

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

0
source

I came across this answer after reading a post on the pyro forums. Let me also contribute here:

I think taking a look at the Pyro-related Gallery module created by the development team will give you a clear idea of ​​how to take care of this.

In galleries, language files follow this structure: modules / galleries / language / language-name / galleries_lang.php

Around 3, I think they should be placed in system / cms / language / lang-name / (and if you can, you should contribute to the Gibbis language of the Pyro community :))

I'm not 100% sure about 4, but I'm sure I saw something in the docs.

+1
source

All Articles