How can I add a information for a view and apply it to all the similar views
-
16-10-2019 - |
Question
My Magento is divided in multiple stores. One for each country that we sell too. And in views that are the different languages.
Here is a screenshot of my setup:
My question is: can I change something for all the English views at the same time without needing to repeat the process over and over again?
Also when I create a category in "All Store Views" in the section "Categories", why is it not applying it to all the other views?
UPDATE
Here is an example:
I have a category named: Business
I want to use Affaires as the French name for my category.
The problem is that I have to change it for each country that as a French view.
Isn't there a way to automate this?
Solution
Short answer, you can't (easily) One idea is to add an translation option to the title inside the template.
So this means:
<?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?>
will turn into:
<?php echo $this->__($_helper->categoryAttribute($_category, $_category->getName(), 'name')); ?>
And use a translate.csv to translate all the elements.
An other way is to write an observer for the *_save_after event and than match it with the locale code of the specific store. But its a little tricky since you cannot differ the titles anymore between websites.
(e.g. store1 you want to have the name: "category1 is awesome" and in store2 you want "category1 is great". This is not possible after using applying the observer)