{"id":19306473,"url":"https://github.com/rbatinov/multilanguagewebsitejs","last_synced_at":"2025-10-14T01:33:06.101Z","repository":{"id":178916691,"uuid":"297683534","full_name":"rbatinov/MultiLanguageWebsiteJS","owner":"rbatinov","description":"This is a template for MultiLanguage support of a website. It uses only JavaScript to implement the logic. It is easy to implement and does not require some extra frameworks or extensions.","archived":false,"fork":false,"pushed_at":"2021-07-10T10:51:13.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-06T00:44:08.793Z","etag":null,"topics":["javascript","multilanguage","multilanguage-support","simple","translate","translation","translators","web","webapp","webapplication","website"],"latest_commit_sha":null,"homepage":"https://rbatinov.github.io/MultiLanguageWebsiteJS/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbatinov.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-22T14:58:26.000Z","updated_at":"2022-03-09T09:32:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"8914b8ab-fc90-4172-97ed-a2812284d305","html_url":"https://github.com/rbatinov/MultiLanguageWebsiteJS","commit_stats":null,"previous_names":["rbatinov/multilanguagewebsitejs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbatinov%2FMultiLanguageWebsiteJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbatinov%2FMultiLanguageWebsiteJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbatinov%2FMultiLanguageWebsiteJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbatinov%2FMultiLanguageWebsiteJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbatinov","download_url":"https://codeload.github.com/rbatinov/MultiLanguageWebsiteJS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240408151,"owners_count":19796637,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","multilanguage","multilanguage-support","simple","translate","translation","translators","web","webapp","webapplication","website"],"created_at":"2024-11-10T00:06:26.611Z","updated_at":"2025-10-14T01:33:01.064Z","avatar_url":"https://github.com/rbatinov.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MultiLanguage Website with JavaScript\n\nThis is a \u003cb\u003etemplate for MultiLanguage support of a website\u003c/b\u003e.\nIt uses \u003cb\u003eonly JavaScript\u003c/b\u003e to implement the logic.\nIt is \u003cb\u003eeasy to implement\u003c/b\u003e and does not require some extra frameworks or extensions.\n\nYou can check here the [DEMO](https://rbatinov.github.io/MultiLanguageWebsiteJS/)\n\n\u003cb\u003eStructure of Project:\u003c/b\u003e\n- \u003cb\u003eResources Folder\u003c/b\u003e\n    - Here you can store all files with translations - in this example these are \u003cb\u003een.js and bg.js\u003c/b\u003e. \n    - You simply create a variable with keys and string value with translation.\n        - \u003cb\u003eKey values need to be added in data-tag attribute in every HTML element which you want to be translated.\u003c/b\u003e\n- \u003cb\u003eScripts Folder\u003c/b\u003e\n    - \u003cb\u003edefaultValues.js\u003c/b\u003e\n        - All default values for the template.\n    - \u003cb\u003emyFunctions.js\u003c/b\u003e\n        - All functions that are used.\n        - getCookie - it is used to check if cookie with language exists. I prefer to store the language in cookie in order to remember the clients preferences.\n        - translateAll - translates all elements in DOM where data-tag exists\n            - \u003cb\u003eNote that all html elements need to have data-tag attribute with their key in order to be translated.\u003c/b\u003e\n    - \u003cb\u003eTranslate.js\u003c/b\u003e\n        - This is the implementation of the Language class. It creates an instance with default language. The default language is set in the defaltValues.js file.\n        - getVal - returns the translated value by the key passed. You can pass default value, if no key exists or 'undefined' will be returend.\n- \u003cb\u003eStyles Folder\u003c/b\u003e\n    - style.css - simple styles for presentation page\n- \u003cb\u003eindex.html\u003c/b\u003e\n    - Example page where you can test the translation of page.\n\n## Enjoy!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbatinov%2Fmultilanguagewebsitejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbatinov%2Fmultilanguagewebsitejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbatinov%2Fmultilanguagewebsitejs/lists"}