I want to translate Magento 2 maintenance page as per country code
Like :-
magento2/it (In the Italian language)
magento2/de (In German)
I tried using csv but it doesn't work even using __('echo the content')
I want to translate Magento 2 maintenance page as per country code
Like :-
magento2/it (In the Italian language)
magento2/de (In German)
I tried using csv but it doesn't work even using __('echo the content')
By default, Magento doesn't support translation out-of-box for error pages and requires some customizations to allow for such features. So technically there is no proper way to do such.
Since the full stack is NOT initialized during error generation, normal translation functionality $this->__('foobar'; won't work in the templates. https://magento.stackexchange.com/a/89316/101754
Found another way for translated maintenance page:
RewriteCond %{HTTP_HOST} ^french.example.com$ RewriteCond %{DOCUMENT_ROOT}/var/.maintenance.flag -f RewriteCond %{QUERY_STRING} !(^|&)skin=french(&|$) [NC] RewriteRule ^ %{REQUEST_URI}?skin=french[L]
Copy pub/errors/default to pub/errors/french
Change/translate template files to your needs