Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Sky7ure's avatar

Condition a Nova theme

How to apply a theme under a certain condition? I have an RTL theme that I want to apply if the App::getLocale() let's say was ar for example.

0 likes
1 reply
zakaria_tbey's avatar

let me know if you find a solution for this,

a work around is to edit the boot function in the ThemeServiceProvider.php file of the package

    public function boot()
    {
        $locale = \App::getLocale();
        if($locale == 'ar'){
		//original code
        }
    }

Please or to participate in this conversation.