[campsite-support] list of languages
  • Hello all,

    please, is there any way how to list all languages which are used in
    publication? It would be enough to have possibility to list issues
    regardless their translations or something similar. I would like to build
    dynamically generated language menu, and the list of languages in it should
    depend on the content of database only. So I don't want to pre-define code
    for all possible languages in template. Is there any way how to do that?

    Thanks,
    Michal
  • 2 Comments sorted by
  • Hi,

    we are using some deep folder structure to store campsite templates. I
    figured out that includes only work using the complete path to template,
    relative from the templates folder, if section/article templates are stored
    epper than in templates
    E.g. we have

    templates/skins/greenpiece/section.tpl
    templates/skins/greenpiece/includes/header.tpl

    I have to write the complete path:
    {{ include file="skins/greenpiece/includes/header.tpl" }}

    Using just relative path from the current template won't work:
    {{ include file="includes/header.tpl" }}

    This makes it hard to change the folder structure, because it needs to
    rewrite all includes, links using option "template template_name.tpl" etc.

    Is there some best practice about this issue?

    Thanks,
    Sebastian
  • Hi Michal,

    There is dynamical solution to your problem, it can be implemented of
    course. Something like "list_publication_languages".

    Mugur

    On Wed, Feb 25, 2009 at 6:41 PM, wrote:

    >
    > Hello all,
    >
    > please, is there any way how to list all languages which are used in
    > publication? It would be enough to have possibility to list issues
    > regardless their translations or something similar. I would like to build
    > dynamically generated language menu, and the list of languages in it should
    > depend on the content of database only. So I don't want to pre-define code
    > for all possible languages in template. Is there any way how to do that?
    >
    > Thanks,
    > Michal
    >
    >