Unable to translate "Buy it now button to Norwegian

Hi,

I am using the Translate & Adapt Shopify app. Currently there are two languages on the website: English (Default) and Norwegian. The website has been successfully localized in Norwegian, except for the “Buy it now” button.

This record does not exist when searching for it in the store’s content within the Translate & Adapt app. Is there a way to translate this button? :slightly_smiling_face:

Hi @hamarsen ,

Bu default, we cannot update the buy now text. However, I have comeup with a workaround to dynamically change it on multiple language. Can you provide me with the link to your store and also the translated text?

Hi @theycallmemakka ,

I could be interested in hearing more about this. The link is www.handtverk.com and the button should say “Kjøp nå” instead of “Buy it now” when Norwegian is selected as a language.

Hi @hamarsen ,

I have custom written a JS solution for this.

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code just above tag

{% if request.locale.iso_code == "no" %}

{% endif %}

If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!

Best Regards,
Makka

1 Like

Thank you so much! This did the trick :heart_eyes:

1 Like

Hello Makka,

I have found an issue with the implementation. After I added products variants (in this case different languages of the digital product), the buy button disappears after switching. The user can still add the product to the cart and the button reappears when refreshing. WDYT? :slightly_smiling_face:

This only occurs on the Norwegian version of the site.

https://handtverk.com/products/rekke-guide?variant=42040727929015

Hey @hamarsen , ‘Buy it now’ is an unusual string and is managed centrally by Shopify. We aim to add translations in every language. Norwegian has two versions on Shopify, just ‘Norwegian’ and ‘Norwgian (Bokmål)’ - which are you using? We should be able to deploy a fix from here.

Hi @richbrown_staff ! That is good to hear. I am using the just “Norwegian” one.

Btw, I also expect this is the one most common in use in Norway as this is default Norwegian, which equals Norwegian (Bokmål).

Hi @hamarsen ,

Please replace the previous code with the new one and see if this works.

{% if request.locale.iso_code == "no" %}

{% endif %}

Thank you! It works, although the button flickers. You can test it here: https://handtverk.com/products/rekke-guide?variant=42041497321655

Hi @hamarsen ,

I have created a new CSS to achieve this translation. Can you replace the previous code with this new one and check if this works.

{% if request.locale.iso_code == "no" %}
    
    {% endif %}

This works good on my test store [https://mangit.myshopify.com/no/products/product-1?variant=35864135958681]

1 Like

Amazing! This works perfectly. Thanks again!

1 Like

Hi again Makka,

Unfortunately, it is not working anymore. Now it says “Buy it now” in both English and Norwegian selected. I have checked and the code is still in the theme.liquid file.

Hi @hamarsen ,

It looks like shopify has changed the attribute on the buy now button. You should be able to make the but button dynamic by replacing previous code with the new code.

{% if request.locale.iso_code == "no" %}
    
    {% endif %}
1 Like

Awesome! Thanks yet again! This did the trick :star:

@hamarsen We’d welcome your opinion on how Norwegian works on Shopify. ‘Buy it now’ and default theme + checkout translations would work if you’d picked Norwegian (Bokmål) but it’s understandable that you’d have picked just ‘Norwegian’. Can you give an opinion on how this comes across to you as a merchant / how it could be improved? For info, Norwegian comes with the language ISO code ‘no’ whereas Norwegian (Bokmål) would have the code ‘nb’. Let us know how you’d expect it to work

Hi @richbrown_staff ,

Great that you are following this up!

Norway has two official languages: Norwegian (Bokmål) and Norwegian (Nynorsk). Close to 90% of the population use Norwegian (Bokmål) and most see this as the standard Norwegian. Whenever the option to select just “Norwegian” comes up, most Norwegians would assume that this refers to Bokmål.

However, the correct approach would be to offer two options: Norwegian (Bokmål) and Norwegian (Nynorsk). This is recommended, also because those who use Nynorsk can be vocal about their preference.

As for the language ISO code, “no” is the most common language abbreviation for Norwegian on the web. “nb” also works, but is not as common as “no”.

If the translations are working correctly for Norwegian (Bokmål), I will just switch to that language.

As for Shopify, I think you should reduce the selection to two languages (e.g. migrate the users who have “Norwegian” to "Norwegian (Bokmål)), and use the “no” ISO code for Bokmål. The current situation with three Norwegian languages can be confusing for Norwegian merchants.

Exceptionally useful, thanks @hamarsen , we’ll work on this. So yes in the short term you’ll get all the default theme / checkout / buy it now translations if you use Norwegian (Bokmål), but the language code will be nb.

  • Add Norwegian (Bokmål) in Settings > Languages
  • Export Norwegian
  • Export Norwegian (Bokmål)
  • Copy column H from the CSV for Norwegian to column H in the Norwegian (Bokmål) CSV
  • Save then Import the CSV

Then you should keep your existing no translations, and they’ll be migrated to nb. You can try both and just unpublish the one you don’t want to keep - no need to delete. In the mean time we’ll work on how we manage Norwegian generally this end.

1 Like

Thanks! This is now done. :slightly_smiling_face:

I switched to “nb” and Norwegian (Bokmål). The main issue now is that all the external links that are currently referencing “no” are now getting 404 pages.

Ah - could you share an example of one?