In the past we deployed the locizify script to our own CDN space. While this was ok migrating over to https://unpkg.com allows us to provide you an improved usage. In the past your code was bound to the latest deployed script on our CDN. As we strongly respect semver we just were able to update the script with non breaking updates.
Now as you could use the source from unpkg you're able to fix the version in your code like:
cleanIndent: true, // removes indent, eg. if a p tag spans multiple lines
ignoreCleanIndentFor: ['PRE', 'CODE'], // ignores cleaning up of indent for those tags needing that extra spaceing
cleanWhitespace: true, // removes surrounding whitespace from key
});
</script>
</head>
...
Fragment replacement for links and images
1
2
<imgsrc="/images/{{a.png}}"alt="big A" />
<ahref="/{{statistic}}">Open my statistics</a>
You will find a.png and statistic to be a key in your translations - it's value can be replaced to eg. a-de.png for german (all other languages will fallback to a.png)
Translate other then default attributes on elements
eg: for validation error messages
1
<inputdata-parsley-error-message="This field is required" />
Just add data-parsley-error-message to the translateAttributes Array on init: