How to Hide a Building Block for a Specific Language Using Conditional Visibility in Odoo 18 enterprise
Odoo 18 introduces powerful tools for managing multilingual websites, including the ability to control the visibility of content blocks based on the user's selected language. This feature, called block conditional visibility, allows you to tailor your content by hiding or displaying specific blocks according to the active website language.
Functionality Overview: Conditional Visibility by Language
Conditional visibility enables dynamic content display rules in Odoo’s website builder. When targeting different user languages, you can define which content blocks appear based on the selected language. This enhances user experience by offering language-specific messages, banners, or layouts.
Steps to Hide a Building Block for a Specific Language
Step 1: Go to the Website Module
1. Log in to your Odoo 18 instance.
2. Navigate to the Website module.
Step 2: Enter Edit Mode
3. Open the webpage where you want to modify a building block.
4. Click the Edit button in the top-right corner to enter the website editor mode.
Step 3: Select the Building Block
5. Select the one Building block
6. Click on the Customize tab associated with the block.
Step 4: Set Conditional Visibility
7. In the block options, locate the Visibility section.
8. Click on Conditional Visibility.
9. Choose the condition type: Language.
10. Select the language(s) for which this block should be shown or hidden.
Example: To hide a block when the user selects "Arabic," configure the condition as Language is not Arabic
Step 5: Save
11. Once your condition is set, click Save.
12. Click Save again on the page editor to publish your changes.
Use Case Scenarios
Show promotional banners only for English-speaking users.
Hide region-specific blocks in other languages.
Display legal disclaimers in local languages only.