Forked from leobossmann/clone shopify checkout locale
Created
October 19, 2013 07:26
-
-
Save ajmalafif/7052623 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When logged in, go to "Settings > Checkout > Checkout Language", click the "View and customize this translation" link. | |
A page with a url like this opens: "https://yourshop.myshopify.com/admin/settings/locales/[locale_id]". | |
copy [locale_id]. | |
Go Back and choose "create a new one". | |
Open the Javascript console, paste this (change to your shop/locale_id first): | |
$.get('https://[yourshop].myshopify.com/admin/locale_translations.json?locale_id=[locale_id]', function(data) { | |
transformed_lang = {}; | |
$.each(data.locale_translations, function(i, item){ | |
transformed_lang[item.english] = item.text; | |
}); | |
$('.ssb').each(function(i, item){ | |
$(item).find('input').val(transformed_lang[$(item).find('label').text()]); | |
}); | |
}); | |
Voilà, it's yours to edit. You have to tab through every single one of the fields in order to effectiviely "get" the strings, but that's small work compared to translating all by yourself. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment