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

Support single language sites with occasional different language posts #2901

Open
jcea opened this issue Sep 10, 2017 · 6 comments

Comments

Projects
None yet
4 participants
@jcea
Copy link

commented Sep 10, 2017

My blog is written mainly in Spanish but I publish English only posts from time to time.

Nikola multilanguage sites are not appropriate because not every article is translated. In fact there are no translated articles at all: most articles are written in Spanish and some are written in English, with no Spanish translation at all.

Would be really nice if nikola supports this. Currently if I write a post in English, tags like "warning" or "source code" are translated to Spanish.

If posts could have a metadata tag for language, with default being "site wide default language", would be nice.

Thanks.

@michaelb42

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2017

What about this section from conf.py?

# If this is set to True, the DEFAULT_LANG version will be displayed for
# untranslated posts.
# If this is set to False, then posts that are not translated to a language
# LANG will not be visible at all in the pages in that language.
# Formerly known as HIDE_UNTRANSLATED_POSTS (inverse)
SHOW_UNTRANSLATED_POSTS = True

Regards.

@Kwpolska

This comment has been minimized.

Copy link
Member

commented Sep 11, 2017

Sorry, that won’t cut it. If those posts were English-only, they would not appear on the default Spanish site, archives, feeds, severely impacting discoverability of those posts. There would be an English link in the navbar to a desolate place with only a few entries, and some files/parts of the site would be needlessly duplicated

@michaelb42

This comment has been minimized.

Copy link
Contributor

commented Sep 11, 2017

Hm, nikola single language sites do not support posts in different languages, but multi language sites may be configured to

  • show untranslated posts in all languages
  • show untranslated posts in recent posts list, archive, etc. for all languages
  • have a default language
    Files of untranslated posts will be duplicated, but that's the way a multi language site is supposed to work and should be no real problem.
@jcea

This comment has been minimized.

Copy link
Author

commented Sep 30, 2017

I would like to be able to post an english article from time to time, when 99% of my posts are in spanish. This is not a multilanguage site, it is a spanish site.

Would an optional "lang" metadata field in the article be enough?. That would just override the default language for THAT post.

@Kwpolska

This comment has been minimized.

Copy link
Member

commented Oct 1, 2017

Sure, it will work. However, implementing it probably won’t be easy.

@mardy

This comment has been minimized.

Copy link

commented Jan 31, 2019

@jcea I'm using a multi-language site, where English is the default language. I write posts in English, Interlingua and Italian, and only very rarely my posts are translated; that is, most of the times I do write in a language only, which might be any of those three.

I don't see a problem with that, but maybe you can point out what you believe is wrong? My site is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.