Date translate

Solved
daiana
Tourist
16 0 2

Hello,

 

The main language of my website is Romanian. I translated all the data I needed, but I can't translate the months. Can you help me? Or can I change the format?

 

 

Thank you

Capture.PNG

0 Likes
Tejas_Nadpara
Shopify Partner
1027 215 479

@daiana 

 

This solution does require working with code and Liquid files, and if this is something you would not be comfortable with, I would advise you to reach out to one of Shopify Experts, or contact me. As always, when making code changes to your theme, please remember to create a backup, in case you need to revert back to previous versions of the theme.  

 

Thank you,

Tejas

Shopify Expert | Skype: tejas.nadpara
- Like and Mark as an Accepted Solution if reply helpful
- Feel free to contact me on support@hexaecommerce.com regarding any help
0 Likes
daiana
Tourist
16 0 2

Thank you. Can you give me a hint?  I would like to try

0 Likes
Tejas_Nadpara
Shopify Partner
1027 215 479

@daiana 

 

I did same thing before, you can check following code (This is just hint, final code may be different for your store).

{% assign newDate = 'now' | date:'%A %B %d, %Y' %}

{% if newDate contains 'May' %}
  {{ newDate | replace: 'May', 'Mai' }}
{% elsif newDate contains 'Oct' %}
  {{ newDate | replace: 'Oct', 'Okt' }}
{% else %}
  {{ newDate }}
{% endif %}

Cheers,

Tejas

Shopify Expert | Skype: tejas.nadpara
- Like and Mark as an Accepted Solution if reply helpful
- Feel free to contact me on support@hexaecommerce.com regarding any help
0 Likes
Jason
Shopify Expert
10039 119 1876

This is an accepted solution.

There's an old stash of code here that can also help. Same idea as the above.

https://github.com/freakdesign/Shopify-code-snippets/tree/master/Translate%20date%20strings%20into%2...

 

(or direct link to the raw code)

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
daiana
Tourist
16 0 2

Thanks for the help

0 Likes
Thracian1
Tourist
12 0 4

@Tejas_Nadpara should we create a new snippet or just add the code wherever we have a date? My store URL is www.thracianbio.myshopify.com

0 Likes