tranduyhung / grav-theme-x-corporation

X-Corporation theme is a port of X-Corporation by uiCookies for Grav CMS
MIT License
33 stars 13 forks source link

multilang and footer blocks #19

Open pbt39ppc opened 7 years ago

pbt39ppc commented 7 years ago

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?

tranduyhung commented 7 years ago

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.

pbt39ppc commented 7 years ago

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

tranduyhung commented 7 years ago

Could you post your current language file here? Thanks!

pbt39ppc commented 7 years ago

its defailt from antimatter languages.zip

pbt39ppc commented 7 years ago

or maybe you can upload skeleton with example somewhere?

tranduyhung commented 7 years ago

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?

pbt39ppc commented 7 years ago

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

tranduyhung commented 7 years ago

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.

pbt39ppc commented 7 years ago

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 ???

tranduyhung commented 7 years ago

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.