Skip to content

Instantly share code, notes, and snippets.

View joepetrakovich's full-sized avatar

Joe Petrakovich joepetrakovich

View GitHub Profile
@joepetrakovich
joepetrakovich / translation.js
Last active July 31, 2022 04:48
Translating strings that weren't translated on the server
jQuery(function ($) {
function applyTranslation(stringInfo, currentLanguage) {
const elements = $(stringInfo.selector);
if (!elements.length) {
return;
}
const translation = stringInfo.translations