{"id":50102571,"url":"https://github.com/metlinskyi/web-forms","last_synced_at":"2026-05-23T08:05:46.559Z","repository":{"id":116386906,"uuid":"197763941","full_name":"metlinskyi/web-forms","owner":"metlinskyi","description":"The proof of concept of asp.net web-forms localization approach","archived":false,"fork":false,"pushed_at":"2024-08-20T12:42:29.000Z","size":982,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-20T14:44:05.941Z","etag":null,"topics":["asp-net","csharp","webforms"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"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/metlinskyi.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":"2019-07-19T11:50:44.000Z","updated_at":"2024-08-20T14:44:19.275Z","dependencies_parsed_at":null,"dependency_job_id":"5d09b8fa-daa8-40ab-8365-14e0eafad036","html_url":"https://github.com/metlinskyi/web-forms","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/metlinskyi/web-forms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metlinskyi%2Fweb-forms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metlinskyi%2Fweb-forms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metlinskyi%2Fweb-forms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metlinskyi%2Fweb-forms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metlinskyi","download_url":"https://codeload.github.com/metlinskyi/web-forms/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metlinskyi%2Fweb-forms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33387662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"last_error":"SSL_read: 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":["asp-net","csharp","webforms"],"created_at":"2026-05-23T08:05:46.492Z","updated_at":"2026-05-23T08:05:46.548Z","avatar_url":"https://github.com/metlinskyi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Asp.Net Web Froms Localization\n\nThe proof of concept application with demonstration of localization for Asp.Net Web Froms.\nThe main target is to minimize the copying of a code.\n\n#### Web.config\n\nSet a default culture.\n\n```XML\n\u003csystem.web\u003e\n    \u003cglobalization uiCulture=\"en-US\" culture=\"en-US\" /\u003e\n```\n\nSet extend Asp.Net localization controls.\n\n```XML\n\u003ccontrols\u003e\n    \u003cadd assembly=\"Web.Localization\" namespace=\"Web.Localization.UI\" tagPrefix=\"asp\"/\u003e\n```\n\n#### Literals\n\nCreate culture resource files.\n\n```\n.\n+-- App_GlobalResources\n|   +-- UI.resx             // default resource\n|   +-- UI.es-US.resx       // localized resource\n```\n\nUse the expression builder in the ASP.NET Web Form page.\n\n```ASP\n\u003casp:Literal runat=\"server\" Text=\"\u003c%$ Resources: UI, BrandName %\u003e\" /\u003e\n```\n\n#### Routing\n\nSet culture routing handler in RouteConfig.cs\n\n```C#\nvar handler = new CultureRouteHandler(\"culture\", \"page\")\n{\n    WebRoot = \"~/Pages/\",\n};\n\nroutes.Add(new Route(string.Empty, handler));\nroutes.Add(new Route(\"{culture}/{*page}\", handler));\n```\n\nDifferent culture pages. \nWhen the route handler does not find a specific culture page, then system will get a common page.\n\n```\n.\n+-- Pages\n|   +-- Account.aspx            // common page\n|   +-- Account.es-US.aspx      // specific page \n```\n\nUse links with {culture} tag.\nAll values of 'href' or 'src' attributes with {culture} tag will be replaced to current culture.\n\n```ASP\n\u003ca runat=\"server\" href=\"~/{culture}/Account\"\u003e\u003casp:Literal runat=\"server\" Text=\"\u003c%$ Resources: UI, AccountTitle %\u003e\" /\u003e\u003c/a\u003e\n```\n\n#### UI\n\nDifferent culture templates on a page.\nIf the Localization control does not find a specific culture template, then a default template will be rendered.\n\n```ASP\n\u003casp:Localization runat=\"server\"\u003e\n    \u003casp:Culture runat=\"server\"\u003e\n        \u003c!-- Default template for all cultures --\u003e\n    \u003c/asp:Culture\u003e\n    \u003casp:Culture runat=\"server\" Name=\"es-US\"\u003e\n        \u003c!-- Specific es-US culture template --\u003e\n    \u003c/asp:Culture\u003e\n\u003c/asp:Localization\u003e\n```\n\nDifferent culture templates of UserControl.\nIf a UserControl does not find a specific culture template, then a default template will be rendered.\n\n```\n.\n+-- Controls\n|   +-- UserProfile.ascx          // common control template \n|   +-- UserProfile.es-US.ascx    // specific control template\n```\n\n#### Performance\n\nAll searching process results will be cached, for example:\n\n```C#\n// Trying to find a valid template path in a cache.\nvar key = string.Concat(culture, AppRelativeVirtualPath);\nvar appRelativeVirtualPath = Cache[key] as string;\nif (string.IsNullOrEmpty(appRelativeVirtualPath))\n{\n    // The template path not found in cache, creating a new template path with current culture.\n    appRelativeVirtualPath = AppRelativeVirtualPath.Replace(\".ascx\", $\".{culture}.ascx\");\n\n    try\n    {\n        // Trying to load the localized template.\n        template = LoadTemplate(appRelativeVirtualPath);\n        Cache[key] = appRelativeVirtualPath;\n    }\n    catch\n    {\n        // The localized template not found, will be use default.\n        Cache[key] = appRelativeVirtualPath = AppRelativeVirtualPath;\n    }\n}\n```\n\n\u0026nbsp;\n============\n\u0026copy; [The Best Software Engineer In The Universe!](https://www.linkedin.com/in/metlinskyi/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetlinskyi%2Fweb-forms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetlinskyi%2Fweb-forms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetlinskyi%2Fweb-forms/lists"}