Jump to content

Is there a way to make the SEO-paths always become in swedish?


bos

Recommended Posts

I run a Cubecart-store in Swedish; all products and categories are in Swedish. On occation, some products and categories also have an English translation.

Recently I found a strange thing, when I switched the superuser-account to English and used the admin panel to add a new product (that has a translation); the SEO-path for that product appears in English. If I switch back to Swedish and re-add a new product, the SEO-path appears in Swedish. If I switch back to English again and browse to the product, the SEO-path is still in Swedish (which is what I want).

However, I would prefer that all SEO-paths are in Swedish, no matter which language I use in the admin panel. I peeked around under the Search Engines tab, but found no obvious setting for this.

Is it possible to enforce SEO-paths to always use Swedish?

2017-12-06_193133.png

Link to comment
Share on other sites

Yes. CubeCart will create the seo-path using the product name as the source for the path. Thus, if you enter the Product Name in Swedish, CubeCart uses whatever is there (swedish words) to create the path. If you enter the Product Name in in English, CubeCart uses whatever is there (english words) to create the path. If you enter the Product Name in Klingon, CubeCart uses whatever is there (klingon words) to create the path. The Product Name is language-agnostic - what you enter is what it is. For translations, again, the Product Name you enter is what it is for that translation. I will have to check, but I believe CubeCart uses the primary language (as opposed to any translation) of the Product Name as the source for the seo-path.

Once the seo-path has been created, CubeCart remembers it. CubeCart does not re-create the seo-path should you change the Product Name or add translations. You can let CubeCart reconstruct the seo-path by blanking the existing seo-path in the text entry field, then submitting the form.

CubeCart will create the seo-path from the Product Name unless you actually enter whatever seo-path you want this product to have. The seo-path need not be similar or related to the Product Name in any way. Only if the seo-path is left blank when submitting the form will CubeCart create one for you.

Curently, CubeCart is not coded to accept more than one seo-path for a product, document, and category. Work is in progress to allow language-specific seo-paths to point to the same item.

Edited by bsmither
Link to comment
Share on other sites

I can now confirm that you are correct, and that the actual culprit is the category name.

I have a category named "Kablar", which is "Cables" in English (the translation exists). Using English for the administrator, I added a test product and selected the Cables-category. The SEO-path became "cables/test", which is not what I want. I want the Swedish names for all paths. In this case, "kablar/test".

I can understand why the English category name was chosen, but I'm not very fond of it. The simple solution would be to get rid of dual languanges, but that - I surmise - will affect which kind of customers shows up in my store.

Another possibility is perhaps to remove all admin-related translations from the Swedish language-file. That way, I can keep English for the admin panels, while customers still get the Swedish version in the store.

2017-12-07_084035.png

Link to comment
Share on other sites

Consider not including the category names in the path generation. (Admin, Store Settings, Search Engines tab, "Add category to product URL path?" set to "No".)

For the seo-path, enter 'kablar/test'. See if that actually works for you.

Probably better would be 'kablar-test'.

Edited by bsmither
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...