grav-theme-x-corporation icon indicating copy to clipboard operation
grav-theme-x-corporation copied to clipboard

multilang and footer blocks

Open pbt39ppc opened this issue 7 years ago • 10 comments

Hi, i want to rtanslate some strings in the footer blocks. as test i have put {{ 'BLOG.ITEM.CONTINUE_READING'|t }} to the 1st footer block. the output wasnt processed. where did i get wrong?

pbt39ppc avatar Sep 03 '17 17:09 pbt39ppc

The theme doen't have 'BLOG.ITEM.CONTINUE_READING' in footer or in language file. You may need to add that string to the theme's language file by yourself.

tranduyhung avatar Sep 04 '17 02:09 tranduyhung

i have put language file from antimatter, that file have 'BLOG.ITEM.CONTINUE_READING'

pbt39ppc avatar Sep 04 '17 14:09 pbt39ppc

Could you post your current language file here? Thanks!

tranduyhung avatar Sep 05 '17 01:09 tranduyhung

its defailt from antimatter languages.zip

pbt39ppc avatar Sep 05 '17 12:09 pbt39ppc

or maybe you can upload skeleton with example somewhere?

pbt39ppc avatar Sep 05 '17 12:09 pbt39ppc

There is no problems with your language file and I can print out 'BLOG.ITEM.CONTINUE_READING in the footer.

Are you using {{ 'BLOG.ITEM.CONTINUE_READING'|t }} to print that text?

tranduyhung avatar Sep 06 '17 00:09 tranduyhung

yes, i'm using {{ 'BLOG.ITEM.CONTINUE_READING'|t }} and in footer i see {{ 'BLOG.ITEM.CONTINUE_READING'|t }} not the Continue reading...

i was used theme's footer column 1

pbt39ppc avatar Sep 06 '17 15:09 pbt39ppc

I understand your problem now. You added that line of code to the theme's configuration instead of the theme's Twig file.

Twig code is not proceeded in this case. You need to put the text "Continue reading..." instead.

If you need to use Twig, you need to put it right in user/themes/x-corporation/templates/partials/footer.html.twig.

tranduyhung avatar Sep 06 '17 16:09 tranduyhung

Twig code is not proceeded in this case.

ok, how to use footer blocks in multilang site? it content in the file /user/config/themes/x-corporation.yaml is it possible to do something like /user/config/themes/x-corporation.en.yaml /user/config/themes/x-corporation.de.yaml ???

pbt39ppc avatar Sep 06 '17 16:09 pbt39ppc

The theme and Grav don't support those right now.

The only solution is customizing the code of the theme, instead of getting the footer blocks from theme's configuration, it gets those info from a page.

tranduyhung avatar Sep 07 '17 01:09 tranduyhung