{"id":24630746,"url":"https://github.com/fmglib/fmglib.localization","last_synced_at":"2026-04-13T12:04:42.280Z","repository":{"id":218364314,"uuid":"746216278","full_name":"FmgLib/FmgLib.Localization","owner":"FmgLib","description":"This package serves to integrate your system into multiple languages.","archived":false,"fork":false,"pushed_at":"2024-06-08T11:21:28.000Z","size":233,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-08T00:46:45.250Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FmgLib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2024-01-21T12:23:07.000Z","updated_at":"2024-10-28T13:56:20.000Z","dependencies_parsed_at":"2024-06-08T10:37:45.225Z","dependency_job_id":"77f855b6-cdda-47a7-946e-2c80c7aebdb1","html_url":"https://github.com/FmgLib/FmgLib.Localization","commit_stats":null,"previous_names":["fmglib/fmglib.localization"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/FmgLib/FmgLib.Localization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FmgLib%2FFmgLib.Localization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FmgLib%2FFmgLib.Localization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FmgLib%2FFmgLib.Localization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FmgLib%2FFmgLib.Localization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FmgLib","download_url":"https://codeload.github.com/FmgLib/FmgLib.Localization/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FmgLib%2FFmgLib.Localization/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31751711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-01-25T07:12:59.407Z","updated_at":"2026-04-13T12:04:41.987Z","avatar_url":"https://github.com/FmgLib.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿To access related services, simply add `using FmgLib.Localization;` statement.\n\n\nIn the Program.cs file,\n```CSharp\nbuilder.Services.AddFmgLibLocalization();\n```\nshould be added.\n\n\nIn your main project you should have a language file of type json. The translation will be read from this file and imported.\nIf you do not specify the path to the file(s) in the parameter ( \n```CSharp\nbuilder.Services.AddFmgLibLocalization();\nbuilder.Services.AddFmgLibLocalization(defaultLang:\"en-US\");\nbuilder.Services.AddFmgLibLocalization(defaultLang:\"en-US\", \"Loc1.json\", \"Loc2.json\");\n```\n), will look for a json file named `Localization.json` in the home directory.\n\nif you give one or more parameters like \n```CSharp\nbuilder.Services.AddFmgLibLocalization(\"Localization1.json\", \"Localization2.json\", \"/Languages/Temp1.json\");\n```\nit will read json files in given file paths.\n\n\n\nProper json format:\n\n```json\n{\n  \"Hello\": {\n    \"tr-TR\": \"Merhaba Dünya!\",\n    \"en-US\": \"Hello World!\"\n  },\n  \"Msg\": {\n    \"tr-TR\": \"Deneme amaçlı yapılmıştır.\",\n    \"en-US\": \"It was made for testing purposes.\"\n  }\n}\n```\n\nInstead of 'keyWord' keywords, you can use any word or phrase(s) you want. You don't have any Regex limitations.\n\nYou can also change the 'tr-TR' and 'en-US' language keys with words or sentences as you wish. But it is recommended to use expressions such as 'en-US', 'tr-TR', 'fr-FR'.\n\n\nYou can simply use \n```CSharp\nConsole.WriteLine(\"keyWord 1\".ToTranslate());\n``` \nin the code.\n\nIf you do not specify a parameter, it will translate according to the language expression registered in Culture (language keys such as 'en-US', 'tr-TR' will appear).\n\nYou can easily obtain the translation by specifying the language key as \n```CSharp\nConsole.WriteLine(\"keyWord 1\".ToTranslate(\"tr-TR\"));\n```\n.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmglib%2Ffmglib.localization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffmglib%2Ffmglib.localization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmglib%2Ffmglib.localization/lists"}