{"id":18777594,"url":"https://github.com/salif/aham","last_synced_at":"2026-01-26T23:42:48.374Z","repository":{"id":249639318,"uuid":"832118776","full_name":"salif/aham","owner":"salif","description":"[Mirror] Build multilingual Gleam applications","archived":false,"fork":false,"pushed_at":"2024-07-22T11:52:24.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T20:56:57.645Z","etag":null,"topics":["gleam","gleam-lang","i18n","internationalization","localisation","localization"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/aham","language":"Gleam","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/salif.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-07-22T11:49:16.000Z","updated_at":"2024-11-01T18:36:26.000Z","dependencies_parsed_at":"2024-07-27T22:02:04.591Z","dependency_job_id":null,"html_url":"https://github.com/salif/aham","commit_stats":null,"previous_names":["salif/aham"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/salif/aham","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salif%2Faham","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salif%2Faham/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salif%2Faham/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salif%2Faham/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salif","download_url":"https://codeload.github.com/salif/aham/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salif%2Faham/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28791336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"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":["gleam","gleam-lang","i18n","internationalization","localisation","localization"],"created_at":"2024-11-07T20:12:29.723Z","updated_at":"2026-01-26T23:42:48.369Z","avatar_url":"https://github.com/salif.png","language":"Gleam","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aham\n\n[![Package Version](https://img.shields.io/hexpm/v/aham)](https://hex.pm/packages/aham)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/aham/)\n\n```sh\ngleam add aham@1\n```\n```gleam\nimport aham\nimport gleam/io\nimport locale\n\n// Esperanto\nconst messages_eo: aham.Bundle = [#(\"Hello\", \"Saluton\"), #(\"world\", \"mondo\")]\n\n// Turkish\nconst messages_tr: aham.Bundle = [#(\"Hello\", \"Merhaba\"), #(\"world\", \"dünya\")]\n\n// Bulgarian\nconst messages_bg: aham.Bundle = [#(\"Hello\", \"Здравей\"), #(\"world\", \"свят\")]\n\n// Bulgarian Test (made-up)\nconst messages_bg_test: aham.Bundle = [#(\"Hello\", \"Zdravei\")]\n\npub fn main() {\n   // The examples use the Esperanto locale\n   // There are two ways to use:\n\n   // With values\n   let messages =\n      aham.new_with_values()\n      |\u003e aham.auto_add_bundle(locale.get_locale(), [\n         #(\"eo\", \"\", messages_eo),\n         #(\"tr\", \"TR\", messages_tr),\n         #(\"bg\", \"BG\", messages_bg),\n         #(\"bg\", \"TEST\", messages_bg_test),\n      ])\n\n   messages |\u003e aham.get(\"Hello\") |\u003e io.println\n   // Prints \"Saluton\" in Esperanto\n   messages |\u003e aham.get(\"Not translated yet\") |\u003e io.println\n   // Prints \"Not translated yet\" in English\n\n   // With keys\n   let messages2 =\n      aham.new_with_keys([\n         #(\"key1\", \"Hello\"),\n         #(\"key2\", \"world\"),\n         #(\"key1000\", \"I am not translated\"),\n      ])\n      |\u003e aham.auto_add_bundle(locale.get_locale(), [\n         #(\"eo\", \"\", [#(\"key1\", \"Saluton\"), #(\"key2\", \"mondo\")]),\n      ])\n\n   messages2 |\u003e aham.get_key(\"key1\") |\u003e io.println\n   // Prints \"Saluton\" in Esperanto\n   messages2 |\u003e aham.get_key(\"key1000\") |\u003e io.println\n   // Prints \"I am not translated\" in English\n   messages2 |\u003e aham.get_key(\"key.does.not.exist\") |\u003e io.println\n   // Prints an empty string\n}\n```\n\nFurther documentation can be found at \u003chttps://hexdocs.pm/aham\u003e.\n\n## Development\n\n```sh\ngleam run   # Run the project\ngleam test  # Run the tests\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalif%2Faham","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalif%2Faham","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalif%2Faham/lists"}