Created
May 10, 2024 04:29
-
-
Save trycf/049ce0b5364a02498c8a14fc0c4539df to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains 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
<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