sivaprasad9394
Occasional Collector

How to make English as fallback condition for footer?

Jump to solution

Hello,

I am working with footer now, In my application i have many languages for translation of the entire page content.

Consider my footer is like below,

FooterSample.jpg

I am using the Page template like below for footer values,

<LANG id="EN">

            <ATTR name="browser1">Tool1</ATTR>

            <ATTR name="browser2">test1</ATTR>

            <ATTR name="browser3">test2</ATTR>

            <ATTR name="browser4">test3</ATTR>

</LANG>

Languages like ,

<LANG id="EN">

<LANG id="DE">

<LANG id="RO">

<LANG id="FR">

So i can translate my page to any of the languahe ny clicking the Language link inside the Page.

<li><a id="permLink" href="#" title="$CMS_VALUE(pt_lang.test_help)$"><img src="$CMS_REF(media:"Image")$" class="sprite">$CMS_VALUE(pt_lang.browser2)$</a></li>

I am using Format template for the footer to read the attribute names.

How can i make suppose there is no translation is done for language French  and attribute name is not defined in the template for test1?

For me system should take english as fallback condition to display the test1.

Thanks for your time.This is my first post.

Thanks,

Siva

1 Solution

Accepted Solutions

Hello Siva,

for this use-case you need the language you want to display (e.g. french) and the current page. With the method isTranslated(Language language) [see de.espirit.firstspirit.access.store.pagestore.Page] you can prove if your site is in the given language translated. If not you can set english as default page. Alternatively you can hide the language-link in your footer.

To get your languages use: #global.project.languages and iterate over the list

To get your current page use: #global.node.getPage

Best regards

Rene

View solution in original post

4 Replies
rednoss
I'm new here

Hello Siva,

I'm not sure if I understand you correctly. You want to use english as fallback language when there is no content for french?

Best regards

Rene

0 Kudos

Hello Rene,

Thank you for you replay and time.

Yes you are correct.I would like to display english as fall back when French content is not defined.

Thanks,

Siva

0 Kudos

Hello Siva,

for this use-case you need the language you want to display (e.g. french) and the current page. With the method isTranslated(Language language) [see de.espirit.firstspirit.access.store.pagestore.Page] you can prove if your site is in the given language translated. If not you can set english as default page. Alternatively you can hide the language-link in your footer.

To get your languages use: #global.project.languages and iterate over the list

To get your current page use: #global.node.getPage

Best regards

Rene

Hello Reno,

Thanks for your replay.The development is currently put on hold.I will get back to you once i start the development.

Thanks for your answers.

Thanks,

Siva

0 Kudos