Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multilang and footer blocks #19

Open
pbt39ppc opened this issue Sep 3, 2017 · 10 comments
Open

multilang and footer blocks #19

pbt39ppc opened this issue Sep 3, 2017 · 10 comments

Comments

@pbt39ppc
Copy link

pbt39ppc commented Sep 3, 2017

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
Copy link
Owner

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
Copy link
Author

pbt39ppc commented Sep 4, 2017

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

@tranduyhung
Copy link
Owner

Could you post your current language file here? Thanks!

@pbt39ppc
Copy link
Author

pbt39ppc commented Sep 5, 2017

its defailt from antimatter
languages.zip

@pbt39ppc
Copy link
Author

pbt39ppc commented Sep 5, 2017

or maybe you can upload skeleton with example somewhere?

@tranduyhung
Copy link
Owner

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
Copy link
Author

pbt39ppc commented Sep 6, 2017

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
Copy link
Owner

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
Copy link
Author

pbt39ppc commented Sep 6, 2017

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants