# config/routes.rb
Rails.application.routes.draw do
  scope ":locale" do
    mount_avo
  end
end
```

## 2. Apply the `locale` Scope

To properly handle localization within Avo, you'll need to ensure the `locale` parameter is respected throughout the request which we'll do by overriding the `set_avo_locale` method in your `Avo::ApplicationController` as follows:

:::info
If you don't have the `app/controllers/avo/application_controller.rb` file present in your app, you can eject it using this command:

```bash
rails generate avo:eject --controller application_controller
```
:::

```ruby{4-6}