tinoni / translate.js

A jQuery plugin to translate text in the client side
MIT License
87 stars 84 forks source link

Translation not working #12

Open jonteohr opened 6 years ago

jonteohr commented 6 years ago

I have been trying to get this to work for hours now and I just cannot seem to get it working.

Is translate.js outdated?

Code:

<html>
<head>
    <title>Translation test</title>
</head>
<body>

    <h1 class="trn">test</h1>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script src="jquery.translate.js"/>
    <script type="text/javascript">
        var dict = {
            "test": {
                en: "This is the translation"
            }
        }

        $('body').translate({lang: "en", t: dict}); //use English

    </script>
</body>
</html>
Cedric-M commented 6 years ago

Hello !

It still works I used it recently, please take a look to the Source code of the Live demo for more details, don't hesitate to ask me if you square up to any problem,

Have a nice day !

utamilah commented 5 years ago

I wonder if you were having the same issue as me: Issue 14