Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.
/ UI-LangJS Public archive

Site language tool used in behemehal services

Notifications You must be signed in to change notification settings

behemehal/UI-LangJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

UI-LangJS [DEPRECATED]

Site language tool used in behemehal services

Getting page ready

main.html

    <!DOCTYPE html>
    <head>       
        <script src="uilang.js"></script>
        <!--
            This is important to add your language file after lang.js and add defer tag to be sure script runs after page fully loaded
        -->
        <script defer src="panel_language.js"></script>
    </head>
    <body>
        <a uiLang="a1"></a>
        <input type="text" uiLang="a2">
    </body>

panel_language.js

    window.lang.data = {
        ver: '1.0.0',
        'tr-TR': {
            a1: {
                text: 'Test',
                type: 'innerHTML'
            },
            a2: {
                text: 'Test',
                type: 'placeholder'
            }
        },
        'en-US': {
            a1: {
                text: 'Test',
                type: 'innerHTML'
            },
            a2: {
                text: 'Test',
                type: 'placeholder'
            }
        }
    }
    window.lang.init() //Start language load after panel_language.js loaded
    window.lang.loadEmitter = () => {
        console.log('Language Loaded')
    }

That's it

About

Site language tool used in behemehal services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published