0

I want to add a new language in my store. It's a language that is really similar to another one already inserted: as example en_GB and en_US.

I'm looking to duplicate it because a big percentage of translations are equal and I don't have to reinsert hundreds of categories and pages translations for the new Store View but just few words.

The default store view is in another language.

What is the best way to do it?

0

I've solved it.

For example, to copy all categories and products from store_id=2 to store_id=8.

We'll have to modify this tables:

 catalog_category_entity_text
 catalog_category_entity_varchar
 catalog_category_entity_int

 catalog_product_entity_text
 catalog_product_entity_varchar
 catalog_product_entity_int

Then we'll have to run this sql query for all 6 tables below:

INSERT INTO  `catalog_<TYPE>_entity_<DATATYPE>` (
 `attribute_id`,
 `store_id`,
 `entity_id`,
 `value`
) 
 SELECT 
 `attribute_id`,
"8",
 `entity_id`,
 `value` 
 FROM
 `catalog_<TYPE>_entity_<DATATYPE>` src 
 WHERE src.`store_id` = 2 AND src.value IS NOT NULL
 ON DUPLICATE KEY 
 UPDATE 
 `catalog_<TYPE>_entity_<DATATYPE>`.`value` = src.`value`;
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.