Solved

Localization not working for menu items linking to pages created by apps

iolo72
Shopify Partner
22 1 3

I set up localization using Translate & Adapt (EN and FR). I have a couple of pages that have been created by 3rd party apps (still within my site), and I've added links to them in the menu by adding customzied URLs instead of selecting pages within the Shopify system (i.e. instead of selecting a page from Products, Collections, or Pages, I added "https://www.myshop.com/apps/xxxxxxxxx" manually.) When I switch the language to FR on the home page and try to navigate to these app-created pages, it takes me to the EN page (because the linked page URLs in the menu don't have "fr/" in the URL.) Once I get to that page (by this time, it has changed back to EN) and I click FR in the language dropdown, the page does load "fr/" page correctly. It just seems that the URLs in the menu don't seem to add "fr/" when "FR" is chosen from the language menu.

Accepted Solution (1)

iolo72
Shopify Partner
22 1 3

This is an accepted solution.

Figured out why it wasn't working. I had to use a relative path instead of a fully qualified URL. Changing the above link to /apps/xxxxxxxxxxxxx worked.

View solution in original post

Replies 3 (3)

iolo72
Shopify Partner
22 1 3

This is an accepted solution.

Figured out why it wasn't working. I had to use a relative path instead of a fully qualified URL. Changing the above link to /apps/xxxxxxxxxxxxx worked.

jeanjulienxyz
Visitor
3 0 0

I have the EXACT same problem with custom links in my menu. I did try to put relative links in the menu instead and it still goes back to french when I am in english. What am I doing wrong?

jeanjulienxyz
Visitor
3 0 0

OK SOLVED! For anyone who face the same issue, specifically with translated filters being the target.

Relative links is the first step but you also have to add both languages for the filter in the url : /collection/nameofthecollection?filter.p.product_type=NAMEINFRENCH&filter.p.product_type=NAMEINENGLISH

 

For example if the filter is "Shirt"

/collection/nameofthecollection?filter.p.product_type=Chemises&filter.p.product_type=Shirts

 

A bit tedious but it does work!