Dear Shopify experts,
We have a bilingual shop, all products have their title translated using Shopify’s Translate and adapt app.
We have a collection that we want to show in both languages, with titles in alphabetical order.
It turns out the collection gets properly alphabetized in the default language (Dutch in our case), but in the alternative language (English) it retains the original Dutch-based sort order. We found the following advice from people running into this before us:
https://community.shopify.com/c/online-store-and-theme/product-lists-not-adhering-to-localised-titles-when-sorting/m-p/2333109
When implementing this advice, i.e. using this liquid statement…
{% assign products = collection.products |sort: ‘title’ %}
then each of the separate pages is alphabetised but the overall-order is not alphabetical.
We let the for-loop iterate the “products” array.
It seems it will only work if we fit all products on a single page.
However, that could make the page slow to load, as there are many products, each with an image, in the collection.
Is there an accepted, better solution to what we are trying to do?
A thing we tried already:
If in liquid we change the “paginate” tag as well, from:
{%- paginate collection.products by section.settings.products_per_page -%}
to
{%- paginate products by section.settings.products_per_page -%}
then we get an error message saying that the array called products cannot be paginated.
Is there a solution to this?
With best regards,
M. Hennekam
Entocare CV