Skip to content

Implemented category translations ala select option translations.#465

Merged
dweeves merged 1 commit intodweeves:masterfrom
mblarsen:category-translations
Jul 15, 2016
Merged

Implemented category translations ala select option translations.#465
dweeves merged 1 commit intodweeves:masterfrom
mblarsen:category-translations

Conversation

@mblarsen
Copy link
Contributor

The current recommend and only way of using magmi to create a
category root for each store (not store view) and then through mange
stores assign it there. That means you are forced to create a store for
each language, however the recommended way to make translations of a store is to create a store view for each language.

You cannot set the category root on store view level. So the idea a root
per language doesn't work in this case.

This PR address that by implementing select option style translations
with this syntax:

   catname::[defaultname] or you could say
   danish::[english]

Everything works as before in terms of hierarchies:

    mænd::[men]/sko::[shoes];;kvinder::[women]/sko::[shoes]

Basically it just swaps the default name into the first position and
stores the translate name as an option like is_anchor and is_active
and so on.

You can combine this with the just mentioned options like expected:

    mænd::1::1::0::[men]

and even with position (something that wouldn't have worked before):

    mænd::1::1::0::[men]::5

(Note: due to existing impl. position has to be the last value and you
have to include all three or none of the others)

If you switch between store views in the admin you'll see that it is the
same category tree you are working on. So this is the right way to do
translations.

Fixes #462

The current recommend and only way of using magmi to create a
category root for each store (not store view) and then through mange
stores assign it there. That means you are forced to create a store for
each language, however the recommended way to make translations of a store is to create a store view for each language.

You cannot set the category root on store view level. So the idea a root
per language doesn't work in this case.

This PR address that by implementing select option style translations
with this syntax:

```
   catname::[defaultname] or you could say
   danish::[english]
```

Everything works as before in terms of hierarchies:

```
    mænd::[men]/sko::[shoes];;kvinder::[women]/sko::[shoes]
```

Basically it just swaps the default name into the first position and
stores the translate name as an option like `is_anchor` and `is_active`
and so on.

You can combine this with the just mentioned options like expected:

```
    mænd::1::1::0::[men]
```

and even with position (something that wouldn't have worked before):

```
    mænd::1::1::0::[men]::5
```

(Note: due to existing impl. position has to be the last value and you
have to include all three or none of the others)

If you switch between store views in the admin you'll see that it is the
same category tree you are working on. So this is the right way to do
translations.

Fixes dweeves#462
@mblarsen
Copy link
Contributor Author

Also tested with explicit roots

@dweeves
Copy link
Owner

dweeves commented Jul 15, 2016

Thx for this useful enhancement !

@dweeves dweeves merged commit 88fbf5b into dweeves:master Jul 15, 2016
@mblarsen mblarsen deleted the category-translations branch July 16, 2016 01:13
@mblarsen mblarsen restored the category-translations branch July 16, 2016 01:13
@mblarsen mblarsen deleted the category-translations branch October 10, 2017 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants