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

Can we support multiple languages ? #234

Open
mobilelifeful opened this issue Sep 16, 2022 · 9 comments
Open

Can we support multiple languages ? #234

mobilelifeful opened this issue Sep 16, 2022 · 9 comments
Labels
enhancement New feature or request

Comments

@mobilelifeful
Copy link

mobilelifeful commented Sep 16, 2022

Describe the bug
A clear and concise description of what the bug is.
A site build in English and Spanish, each post and page are organized in www.example.com/en or www.example.com/es

@tw2113
Copy link
Member

tw2113 commented Sep 16, 2022

@mobilelifeful edited your original issue to just the parts provided, and removed the template parts for brevity.

@tw2113
Copy link
Member

tw2113 commented Sep 16, 2022

Looks like there's a whole section on this over at https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/

We also have a touch of WPML support enabled as well with the plugin, in case that's what you're using for your internationalization

Beyond that, we're admittedly pretty limited out of box for configuration for handling multiple languages in a given site owner's indexes, but I have to imagine it's possible to accomplish overall with our hooks system to configure as needed.

@mobilelifeful
Copy link
Author

Using translatepress plugin to help me translate the site,
Also found this plugin search-wpml-algolia which requires to use WPML, although it enables multiple languages search now; but is too expensive for me right now. WPML,

search-wpml-algolia plugin uses some of WebDevStudios code, wonder if WebDevStudios can support multiple languages search when translatepress is used.

@tw2113
Copy link
Member

tw2113 commented Sep 19, 2022

I suspect it's possible as a whole already, as we have all of the facility to index content, the question is really how to best do that with the least amount of work. Biggest thing is keeping the content potentially separate, and serving the correct version to users, based on chosen language when viewing the site.

@mobilelifeful
Copy link
Author

no, I tested it, wp-search-with-algolia work with multiple languages when search-wpml-algolia plugin is installed which also requires WPML is installed,
wp-search-with-algolia doesn't work at all when translatepress plugin is installed (even installed with wp-search-with-algolia is installed)

@tw2113
Copy link
Member

tw2113 commented Sep 20, 2022

If we're going to aim for adding out-of-box support, we'd definitely need to test and confirm behavior, and I know all of our WPML integrations are over in https://github.com/WebDevStudios/wp-search-with-algolia/blob/main/includes/class-algolia-compatibility.php which is mostly checking if WPML is enabled, and then doing language switching.

We'd need to explore doing the same, but with TranslatePress instead.

@mobilelifeful
Copy link
Author

Any option we can enable to provide the log ?

@asharirfan asharirfan added the enhancement New feature or request label Sep 21, 2022
@asharirfan
Copy link
Contributor

Adding this issue here just for reference: algolia/algoliasearch-wordpress#567

@asharirfan asharirfan added this to the 2.3.0 milestone Sep 21, 2022
@tw2113
Copy link
Member

tw2113 commented Oct 20, 2022

Looks like TranslatePress does a lot of custom tables to store translations and somehow maps them to the correct spot.

wp_trp_dictionary_en_us_en_gb
wp_trp_gettext_en_gb
wp_trp_gettext_en_us
wp_trp_gettext_original_meta
wp_trp_gettext_original_strings
wp_trp_original_meta
wp_trp_original_strings

This will make it difficult to index, as compared to other internationalization plugins that rely on unique post entries that are easy to get indexed.

@tw2113 tw2113 removed this from the 2.3.0 milestone Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants