See https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_meta. I want to add a description meta tag to the project for sharing purposes. Is it possible to use the localization system with it like everything else in the game itself?
Method #1
In your exported build you could use the meta attribute: lang. This method is rather static however.
<meta name="description" lang="en" content="English Translation">
<meta name="description" lang="fr" content="France Translation">
<meta name="description" lang="de" content="Germany Translation">
<meta name="description" lang="es" content="Spain Translation">
Method #2
You could dynamically set your webpage’s description content with JavaScript.
<html>
<meta id="my_meta_id" name="description" content="Initial Translation" />
</html>
<script type="text/javascript">
window.onload = function () {
SetDescription();
}
function SetDescription(){
document.getElementById("my_meta_id").setAttribute("content", "Dynamic Translation");
}
</script>
2 Likes
Lovely, thanks a lot!
1 Like