Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save trycf/049ce0b5364a02498c8a14fc0c4539df to your computer and use it in GitHub Desktop.
Save trycf/049ce0b5364a02498c8a14fc0c4539df to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
alternateUrls = "de https://www.goethe.de/ins/kr/de/404linkliste.html, de https://www.goethe.de/ins/id/de/404linkliste.html, de https://www.goethe.de/ins/de/de/404linkliste.html, ja https://www.goethe.de/ins/de/ja/404linkliste.html, pt https://www.goethe.de/ins/de/pt/404linkliste.html";
countryIsoCode = "af";
function getAlternateHreflangCode (countryIsoCode, langIsoCode) {
return langIsoCode & "-" & Ucase(countryIsoCode);
}
ArrayEach(listToArray(alternateUrls, ",", true, true), function(alternateUrl){
WriteOutput(city & " ");
}
);
writeDump(getAlternateHreflangCode(countryIsoCode, alternateUrl))
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment