-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Search plugin just works for the default language #31
Comments
@Caetan95 hi; sure it should not be a problem if you can provide me with an example and what you expect from it? |
Thanks for your quick reply @ultrabug we really appreciate it. I would expect to search in each language separately, so depending on which language I am, it will search into it. Currently, the behavior is that it always searches in the default language (in your example, in English), and if I change to français it will continue searching in the English version. In addition, if I search for some French word (in the French version) that is present in the text it can't find anything, since as far as I understand it just searches into English files (the default language) without taking into account the language that is currently selected. 2. French language search (no results) 3. French language search (searching for English stuff) So taking into account this example, I would expect that 2. French language search (no results) shows some results (as the word décrite appears in the files) and it would be nice too that 3. French language search (searching for English stuff) doesn't show any results from other languages (just the selected one, which is French in this screenshot), but maybe this last one is not as critical as the second one, the French language search with no results (by extension all languages that are not the default). I would like to thank you again for your collaboration :) |
FYI @Caetan95 the way the search plugin is implemented prevents us from having a search index per language. I'm almost done with this, it works good on mkdocs 1.1.2 but not on 1.2... looking into it now. |
Hello @ultrabug, thanks for your commitment. Just FYI, I have been testing the new mkdocs 1.2 release with your plugin and I haven't found any other conflict (apart from those that we have already discuss). Thanks again for your work :) |
Search results will include all the pages from all the localized contents. This means that your search results can't be contextual to the language you are currently browsing. The `mkdocs-static-i18n` plugin will try to be smart and deduplicate the pages from the `default_language` so that search results are not polluted. This is because the MkDocs `search` plugin is hardcoded in the themes javascript sources so there can only be one search index for the whole build.
version 0.15 is out mate, thanks! |
Hello again. Sorry for the inconvenience, but we found another problem in the plugin, now is the integration with the search plugin. The thing is that the search function only works with the default language, so when we are in a different language it searches only in the default language, ignoring the other languages. I think the problem is with the plugin itself, which is maybe disabling something that the search plugin needs, as long as for example this other one works.
Do you know what the problem could be and if it is easy to solve?
Thank you very much.
The text was updated successfully, but these errors were encountered: