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

Add support for site with translations #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lfxgroove
Copy link

This kind of hackily supports translations for footer_links/tagline. An example of how that might look when you've got english and russian translations:

[extra]
[extra.footer_tagline]
en = "English tagline"
ru = "Russian tagline"

[extra.footer_links]
en = [{url = "$BASE_URL/about", name = "English about"}] 
ru = [{url = "$BASE_URL/about", name = "Russian about"}]

If this isn't needed the old way that the readme describes still works, then the same values are use independently of the language on the rest of the page. The $BASE_URL in the links above will change depending on the current language.

The 'title' and 'description' items should be placed in [translations] and [languages.XX] as described by the Zola guide.

@lfxgroove
Copy link
Author

Seems like the ubuntu image for the checks is too old, not sure if I can do something about that. Have tested these changes locally though and they seem to work.

This kind of hackily supports translations for footer_links/tagline.
An example of how that might look when you've got english and russian
translations:

[extra]
[extra.footer_tagline]
en = "English tagline"
ru = "Russian tagline"

[extra.footer_links]
en = [{url = "$BASE_URL/about", name = "English about"}]
ru = [{url = "$BASE_URL/about", name = "Russian about"}]

If this isn't needed the old way that the readme describes still works,
then the same values are use independently of the language on the rest
of the page. The $BASE_URL in the links above will change depending on
the current language.

The 'title' and 'description' items should be placed in [translations]
and [languages.XX] as described by the Zola guide.
@lfxgroove lfxgroove force-pushed the add_translation_support branch from 8d18e12 to 4d7075b Compare March 29, 2023 16:55
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

Successfully merging this pull request may close these issues.

1 participant