Language Order Customization
Last updated
Last updated
In Orbe, the language list within the selector is ordered by default according to how it's being added to Shopify. However, it's possible to customize this order using CSS, allowing you to prioritize certain languages by placing them at the top of the list.
For example, in this language selector, you can see that Dansk and Italian are at the top when you open the selector:
Here's a step-by-step guide on how to achieve this through Custom CSS:
Step 1: Modify the display of the list
To start, we need to change the display setting of the language list to a grid layout. This allows us to reorder the languages:
Step 2: Set Default Order
Next, set a default order for all languages in the list. This ensures that any language not explicitly reordered will follow this default setting:
Step 3: Reorder Specific Languages
Now, you can select specific languages and assign them a different order. In this example, we're moving English (EN) and Spanish (ES) to the top of the list:
Adding these CSS classes allows you to customize the order of languages within the Orbe selector easily. Just replace "it"
and "da"
with the language codes of your preferred languages to tailor the list to your needs. This refers to the ISO two-letter code (alpha-2) of the language.
Here's the complete CSS snippet for repositioning Italian and Dansk at the top of the list:
With this customization, you can enhance the user experience by highlighting the most relevant languages for your customers.