{"id":20684106,"url":"https://github.com/hesham04dev/localization_lite","last_synced_at":"2025-04-22T12:32:11.411Z","repository":{"id":257825978,"uuid":"872382530","full_name":"hesham04Dev/localization_lite","owner":"hesham04Dev","description":"A package in dart for localization","archived":false,"fork":false,"pushed_at":"2024-10-26T08:24:21.000Z","size":45,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-29T10:19:55.431Z","etag":null,"topics":["dart","flutter","keepitsimple","localization"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/localization_lite","language":"Dart","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/hesham04Dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2024-10-14T10:44:34.000Z","updated_at":"2024-10-26T08:24:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0967a78-5936-42f8-93b0-db7352993acb","html_url":"https://github.com/hesham04Dev/localization_lite","commit_stats":null,"previous_names":["hesham04dev/localization_lite"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hesham04Dev%2Flocalization_lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hesham04Dev%2Flocalization_lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hesham04Dev%2Flocalization_lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hesham04Dev%2Flocalization_lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hesham04Dev","download_url":"https://codeload.github.com/hesham04Dev/localization_lite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250240976,"owners_count":21397901,"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":["dart","flutter","keepitsimple","localization"],"created_at":"2024-11-16T22:19:17.122Z","updated_at":"2025-04-22T12:32:11.392Z","avatar_url":"https://github.com/hesham04Dev.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"https://raw.githubusercontent.com/hesham04Dev/localization_lite/refs/heads/main/screenshots/logo.png\" alt=\"logo\" width=\"20px\"\u003e Localization Lite\n\nA lightweight and simple localization package for Flutter that allows you to easily manage translations using JSON files.\n\n\n## ✨ Features\n\n- 🔎 Automatically detects and applies device language settings\n- 📝 Easy setup with JSON language files.\n- ⚡ Lightweight and fast.\n- 🌍 Support for multiple languages without regions for more simplicity (e.g., `en`, `ar` ... ).\n\n## 🚀 Getting Started\n\n1. **Setup**: Create a new folder called `localization` in your project's `assets` directory.\n2. **Add Language Files**: In the `localization` folder, add JSON files for each language you want to support (e.g., `en.json` , `ar.json`).\n3. **Configure Assets**: Add the localization files to your `pubspec.yaml`:\n   ```yaml\n   dependencies:\n    localization_lite: ^latest_version \n\n   flutter:\n     assets:\n       - assets/localization/\n    ```\n## 📖 Usage\n1. Initialization: Initialize the translation system in your `main.dart` file:\n ```dart\n    await WidgetsFlutterBinding.ensureInitialized();\n    await Translation.init(defaultLang: \"en\");\n ```\n \u003e 📝 note You can also add a custom `path` to the json by adding the path argument to the `init` fn. But when add custom path don't forget to add it to the `pubspec.yaml\n dart` file:\n ```dart\n    await WidgetsFlutterBinding.ensureInitialized();\n    await Translation.init(defaultLang: \"en\",path: \"myCustomPath\");\n ```\n ```yaml\n  flutter:\n     assets:\n       - myCustomPath/\n ```\n \n2. Access Translations: Use the `Translation` class to retrieve translated strings:\n```dart\nString greeting = Translation(\"greetingKey\").toString();\n```\nor\n```dart\nString greeting = tr(\"greetingKey\");\n```\n## 💡Example\nCheck out the `/example` folder for a complete example showing how to set up and use the package.\n## 📬 Additional Information\nFor more information on contributing, filing issues, or requesting new features, please check the [GitHub repository](https://github.com/hesham04Dev/localization_lite). Contributions are welcome, and any feedback or improvements are appreciated!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhesham04dev%2Flocalization_lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhesham04dev%2Flocalization_lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhesham04dev%2Flocalization_lite/lists"}