{"id":15155378,"url":"https://github.com/piyalidas10/language-translator","last_synced_at":"2026-02-05T06:03:50.023Z","repository":{"id":120845941,"uuid":"94497150","full_name":"piyalidas10/Language-Translator","owner":"piyalidas10","description":"Language translator using angularjs","archived":false,"fork":false,"pushed_at":"2017-06-17T04:22:53.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T12:16:18.640Z","etag":null,"topics":["angular1","angularjs","controller","json","language-translator","multi-language"],"latest_commit_sha":null,"homepage":"","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/piyalidas10.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":"2017-06-16T02:29:40.000Z","updated_at":"2020-02-04T19:36:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"b47e5062-ebb3-4f85-8d8b-bc649e811eb1","html_url":"https://github.com/piyalidas10/Language-Translator","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"04f106055467d98c5412f2749f8b97a2e74614c1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyalidas10%2FLanguage-Translator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyalidas10%2FLanguage-Translator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyalidas10%2FLanguage-Translator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyalidas10%2FLanguage-Translator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piyalidas10","download_url":"https://codeload.github.com/piyalidas10/Language-Translator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648975,"owners_count":20972945,"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":["angular1","angularjs","controller","json","language-translator","multi-language"],"created_at":"2024-09-26T18:20:55.561Z","updated_at":"2026-02-05T06:03:49.980Z","avatar_url":"https://github.com/piyalidas10.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Language-Translator\n\nIn this select box, i am fetching the lists of languages that were coming from languages.json file. \n\n    \u003cselect class=\"form-control\" ng-model=\"selectlang\" ng-options=\"lang.name for lang in langs track by lang.value\" ng-change=\"changelan(selectlang)\"\u003e\n\t\t\t\t\u003c/select\u003e\n\nin this select box, ng-init will not work because it is called before json file load. so i have initialized the select box with first value of json data in app.js.\n\n      $scope.selectlang = $scope.langs[0];\n\nI have used \"track by lang.value\" to show languages.json file's value, otherwise select box option value will show object.\n\n      ng-options=\"lang.name for lang in langs track by lang.value\"      \n\nGet the selected option value using changelan function and pass selectlang value through this function. This selectlang value is kept in selectedItems variable and passing this variable to $scope.link, we can access the json file of selected language. Then call again changejson() function to change the json file.\n\n    ng-change=\"changelan(selectlang)\"\n    \n    \n    $scope.changelan = function(val){\n\t\t\t\t\t$scope.selectedItems = val.value;\n\t\t\t\t\tconsole.log($scope.selectedItems);\n\t\t\t\t\t$scope.link = 'JSON/content-'+$scope.selectedItems+'.json';\n\t\t\t\t\t$scope.changejson();\n\t\t  }\n\n\nThe name of json files are given like content-ben.json, content-en.json, content-hi.json.\n\nAnd also apply the following change to the markup:\n\n\t\u003chtml ng-app=\"langtranslator\" ng-controller=\"mainCtrl as mct\" lang=\"{{selectedItems}}\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiyalidas10%2Flanguage-translator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiyalidas10%2Flanguage-translator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiyalidas10%2Flanguage-translator/lists"}