Is it possible to localize a meta tag?

See 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.

  <meta id="my_meta_id" name="description" content="Initial Translation" />

<script type="text/javascript">
window.onload = function () {

function SetDescription(){
    document.getElementById("my_meta_id").setAttribute("content", "Dynamic Translation");

Lovely, thanks a lot!

1 Like