> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Changing the Direction of Menu Tabs Based on the Current Language ## Article: Changing the Direction of Menu Tabs Based on the Current Language ## Article Link: https://dev.wix.com/docs/develop-websites/articles/code-tutorials/wix-editor-elements/changing-the-direction-of-menu-tabs-based-on-the-current-language.md ## Article Content: # Velo Tutorial: Changing the Direction of Menu Tabs Based on the Current Language >**Note:** > This tutorial demonstrates how to use Velo to show and hide different menus in a multilingual site, based on the currently selected language. However, you can use the instructions in this tutorial to customize your page's layout and show or hide any other elements as well, based on the currently selected language. You can use Velo to display menu tabs either "right-to-left" or 'left-to-right" based on the selected language. Site visitors select the language from a language selector dropdown. For example, choosing a language that is read from right-to-left, such as Hebrew, displays the menu options from the right to the left. In the example below, ״צור קשר״ is displayed on the left of the menu, even though in English, it means "Contact Us," which is displayed on the right. This shows that the order of the tabs is based on the language selection.
**Tip:** For languages that read **Right to Left**, you should also change the alignment of the text to right-aligned under **Menu Layout** > **Text Alignment**.### Coding the Redirection of Menu Tabs The sample code below checks the language the user selected using [Wix Multilingual'](https://support.wix.com/en/article/using-wix-multilingual-to-create-a-multilingual-site)s language selector dropdown element and then shows only the menu in the correct language with the correctly-ordered tabs. All other menus are hidden. #### Instructions 1. Open the Code panel. + **Wix Studio:** Click the  on the left sidebar. The [code editor](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/velo-workspace/workspaces/wix-studio-working-with-the-code-panel.md) appears at the bottom of the page. You can drag it up to adjust the size. + **Wix Editor:** If [Dev mode](https://dev.wix.com/docs/develop-websites/articles/get-started/about-developing-websites.md) is enabled, the [code editor](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/velo-workspace/code-editor-ide/working-in-the-code-editor.md) appears at the bottom of the page. You can drag it up to adjust the size. 2. Copy the code below and paste it either in the page tab that has your menus, or in **masterPage.js** located in the Page Code section of the Code sidebar (Wix Studio), or the Velo sidebar (Wix Editor). 3. In the code, make sure to substitute your own menu IDs from the Properties & Events panel (you can hover over the element to see the ID) and the [language codes](https://support.wix.com/en/article/languages-available-in-wix-multilingual) used on your site. 4. Preview or publish the page. ```javascript import wixWindowFrontend from 'wix-window-frontend'; $w.onReady(function () { let myLang = wixWindowFrontend.multilingual.currentLanguage; if (myLang === 'he') { $w('#LTREnglishMenu').hide(); $w('#RTLHebrewMenu').show(); } else { $w('#RTLHebrewMenu').hide(); $w('#LTREnglishMenu').show(); }; }); ``` #### Understanding the Code **Line 1**: Import the `wix-window-frontend` API for Wix Multilingual. **Line 2**: Add your code to the `onReady()` function to make sure all elements are loaded and available. **Line 3**: Use the `currentLanguage` property to determine what language the site visitor chose from the language selector. **Lines 4-6**: If the language is Hebrew, show the Hebrew menu, with tabs ordered from right-to-left. **Lines 7-9**: If the language is not Hebrew, show the English menu, with tabs ordered from left-to-right.