Development discussions around Shopify APIs
Hello,
Is there any way to use localised URLs with App Proxy?
For an instance, a store with multiple active locale will have;
https://abc.myshopify.com/products/handle (default)
https://abc.myshopify.com/fr-CA/products/handle (fr-CA)
However, for an App Proxy, the same isn't working;
https://abc.myshopify.com/tools/my-app (working)
https://abc.myshopify.com/fr-CA/tools/my-app (not working)
Is there anyway to render locale specific data within App Proxy liquid files? Currently, request.locale is always returning shop's primary locale within App Proxy.
Looking forward to a solution 🙂
Thank you.
-- Updated Feb 2020 --
Hey @kevin_mittal,
Localised URLs now work with app proxies. The language is passed along in the accept-language header.
/es/apps/example -> accept-language: es;q=1.0, en;q=0.5
Scott | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi Scotty,
I have the same problem with our "custom app" (proxy app).
I can confirm I'm receiving the "accept-language"-header,
but this doesn't contain the published languages from our shop.
It looks like it sends the languages from the clients-browser...
Published languages in our shop:
English = default, German and French
Received languages header in proxy app:
Chrome: [HTTP_ACCEPT_LANGUAGE] => nl,nl-NL;q=0.9,en;q=0.8,en-US;q=0.7,de;q=0.6,fr;q=0.5,sv;q=0.4,it;q=0.3,lb;q=0.2,da;q=0.1,la;q=0.1,es;q=0.1
IE edge: [HTTP_ACCEPT_LANGUAGE] => nl-NL,nl;q=0.8,en-GB;q=0.5,en;q=0.3
A much bigger issue for me is that front-end isn't accepting localised URL's;
So:
- myshop.com/apps/customapp > is working
- myshop.com/de/customapp > isn't working (404)
(I've already re-installed the app, and made sure that "read_locales" and "read_translations" are in the app scopes).
Can you please advise?
In my question above I made one mistake in the explanation...
And to be sure the problem is clear;
- myshop.com/apps/customapp > is working
- myshop.com/de/apps/customapp > isn't working (404)
- myshop.com/nl/apps/customapp > isn't working (404)
- myshop.com/fr/apps/customapp > isn't working (404)
So at this moment Shopify doesn't point the localised urls to my proxy app.
Thanks @jagmelis
We had to roll back the proxy locale fix, a new fix should be deployed soon. Keep you posted.
Scott | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi @SBD_ ,
Thanks for your response.
I hope it will be implemented soon, as the deadline for our multilingual store is April 14th.
Hi @SBD_ and @Jordan (Jordan Valenzuela),
Any news on this?
I have a feeling it doesn't look very promising at this moment.
And while my boss is breathing on my neck and the 14th of April is approaching very soon, I'll guess I have to fall back on the Dutch Saying...
"sticking bicycle tires" ?
Please keep me posted if you have any news.
Kind regards,
Jeroen
Hey @jagmelis
The fix is being reviewed - unfortunately there's no ETA, keep you posted.
Scott | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi Scotty,
Any news? Could you give us an update on this matter?
We are facing the same problem. Please keep us updated
Also facing this issue. Is that an ETA for a fix that allows app proxies in translated routes?
Nothing to report yet. I'll update this thread as soon as there's news.
Scott | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
@SBD_ sorry to stress but we kinda moved our Shop over from Magento 2 recently and now all of our spanish/italian/portoguese/danish/norwegian/swedish/polish customers have to use the shop in English which lead to a significant drop in our conversion rate.
It's because our product pages are implemented through an app proxy (as it's a customized product)
Would appreciate if you could give a rough estimate when this can be fixed
@Marc_M sorry I'm unable to provide an ETA. Are you able to use a workaround for the time being? Here are two approaches:
1. Parse the language from the headers. For example proxied requests should contain a referer header:
Referer: https://shop.com/es/products/some-product
2. Use JS to attach the language as a query parameter:
/app/example?language=es
Scott | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
@SBD_ we tried this one but once you select Spanish on the home page and then visit /app/product?language=es ( without /es/ ) it redirects to /es/product?language=es which leads to a 404
I guess because Shopify sets a cookie so it always squeezes in the language /es/ in the URL once a customer has set this language. Which makes sense
@Marc_M can you please DM me a link to an example?
Scott | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi @SBD_ we tried both those methods you described and more, nothing worked
How can we render translated content via liquid through an app proxy?
Is there a workaround that should work?
Thanks for your help.
@_Dominik_ the work arounds will only allow you to translate content returned by the proxy, not the entire theme.
For example, /apps/proxy-url?language=es will proxy to your URL with a language parameter.
Scott | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
@SBD_ any update around this?
I'm also having trouble showing my app contents over app proxy when merchants have translations apps that serve content by changing URL (ex. /fr, /de)
User | RANK |
---|---|
42 | |
16 | |
9 | |
9 | |
8 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023