{"id":15695614,"url":"https://github.com/prongbang/android-sheet-localization","last_synced_at":"2025-05-08T21:29:06.303Z","repository":{"id":87919492,"uuid":"301809635","full_name":"prongbang/android-sheet-localization","owner":"prongbang","description":"Generate Android localization from simple online Google Sheets.","archived":false,"fork":false,"pushed_at":"2025-04-27T05:17:33.000Z","size":382,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-08T21:28:55.739Z","etag":null,"topics":["android","android-sheet-localization","generate-localization","generator","google-sheet","localization"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/prongbang.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}},"created_at":"2020-10-06T17:49:52.000Z","updated_at":"2025-04-27T05:17:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"0d0179ad-ba10-4c3c-9a4b-d21410dbe7bb","html_url":"https://github.com/prongbang/android-sheet-localization","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.3076923076923077,"last_synced_commit":"875eb461cc8ea7197476128b198e239f7c2744b6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prongbang%2Fandroid-sheet-localization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prongbang%2Fandroid-sheet-localization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prongbang%2Fandroid-sheet-localization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prongbang%2Fandroid-sheet-localization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prongbang","download_url":"https://codeload.github.com/prongbang/android-sheet-localization/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253152966,"owners_count":21862291,"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":["android","android-sheet-localization","generate-localization","generator","google-sheet","localization"],"created_at":"2024-10-03T19:02:14.567Z","updated_at":"2025-05-08T21:29:06.288Z","avatar_url":"https://github.com/prongbang.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Android Sheet Localization 🌍\n\n[![](https://jitpack.io/v/prongbang/android-sheet-localization.svg)](https://jitpack.io/#prongbang/android-sheet-localization)\n[![Platform](https://img.shields.io/badge/platform-Android-green.svg)](https://developer.android.com)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Kotlin](https://img.shields.io/badge/kotlin-1.5.x-orange.svg)](https://kotlinlang.org)\n\n\u003e Android localization generator that converts Google Sheets data into Android string resources. Inspired by [Flutter Google Sheet localizations generator](https://github.com/aloisdeniel/flutter_sheet_localization).\n\n## ✨ Features\n\n- 📊 **Google Sheets Integration** - Manage translations in a familiar spreadsheet interface\n- 🚀 **Automatic Generation** - Generate string resources at compile time\n- 🌐 **Multi-Language Support** - Support for unlimited languages\n- 🔄 **Real-time Updates** - Changes in Google Sheets reflect in your app\n- 🛠️ **Simple Configuration** - Just add an annotation to start\n- ⚡ **Build Integration** - Works seamlessly with Android build system\n\n## 📦 Installation\n\n### 1. Add JitPack Repository\n\nIn your `project/build.gradle`:\n\n```groovy\nallprojects {\n    repositories {\n        ...\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\n### 2. Add Dependencies\n\nIn your `app/build.gradle`:\n\n```groovy\ndependencies {\n    implementation 'com.github.prongbang:sheet-localization-annotation:1.2.0'\n    kapt 'com.github.prongbang:sheet-localization-processor:1.2.0'\n}\n```\n\nDon't forget to apply the kapt plugin:\n\n```groovy\nplugins {\n    id 'kotlin-kapt'\n}\n```\n\n## 🚀 Quick Start\n\n### 1. Create a Google Sheet\n\nCreate a Google Sheet with your translations:\n\n![Sheet Example](/screenshot/sheet-localize.png)\n\nOr use this alternative structure:\n\n![Alternative Sheet](/screenshot/sheet.png)\n\nThe sheet should have:\n- First column: String keys (identifiers)\n- Subsequent columns: Translations for each language\n\n### 2. Extract Sheet IDs\n\nFrom your Google Sheet URL, extract the `DocumentId` and `SheetId`:\n\n```\nhttps://docs.google.com/spreadsheets/d/\u003cDocumentId\u003e/edit#gid=\u003cSheetId\u003e\n```\n\nExample URLs:\n```\nhttps://docs.google.com/spreadsheets/d/1_97CuyDyVD28ICV_hBGDEdwKGuIokE1egeNlVJn08Tc/edit#gid=0\nhttps://docs.google.com/spreadsheets/d/1r91ECV-As0XtuqGKXU7dXnoY4og9XPBoCqwRcdio6EU/edit#gid=0\n```\n\n### 3. Add Annotation\n\nAdd the `@AndroidSheetLocalization` annotation to your Application class:\n\n```kotlin\n@AndroidSheetLocalization(\n    sheetId = \"0\",\n    documentId = \"1_97CuyDyVD28ICV_hBGDEdwKGuIokE1egeNlVJn08Tc\",\n    enabled = true\n)\nclass MainApplication : Application()\n```\n\n### 4. Build Project\n\nBuild your project (`Make Project` or `Command + F9`):\n\n```\n\u003e Create file values-es/strings.xml\t-\u003e SUCCESS\n\u003e Create file values-zh/strings.xml\t-\u003e SUCCESS\n\u003e Create file values-de/strings.xml\t-\u003e SUCCESS\n\u003e Create file values-hi/strings.xml\t-\u003e SUCCESS\n\u003e Create file values-pt/strings.xml\t-\u003e SUCCESS\n\u003e Create file values/strings.xml\t-\u003e SUCCESS\n\u003e Create file values-ru/strings.xml\t-\u003e SUCCESS\n\u003e Create file values-ja/strings.xml\t-\u003e SUCCESS\n\u003e Create file values-fr/strings.xml\t-\u003e SUCCESS\n```\n\n## 📁 Generated Structure\n\nThe plugin generates the following structure:\n\n```\nres/\n├── values/\n│   └── strings.xml\n├── values-de/\n│   └── strings.xml\n├── values-es/\n│   └── strings.xml\n├── values-fr/\n│   └── strings.xml\n├── values-hi/\n│   └── strings.xml\n├── values-ja/\n│   └── strings.xml\n├── values-pt/\n│   └── strings.xml\n├── values-ru/\n│   └── strings.xml\n└── values-zh/\n    └── strings.xml\n```\n\n## ⚙️ Configuration Options\n\n### @AndroidSheetLocalization Annotation\n\n| Parameter | Type | Description | Required |\n|-----------|------|-------------|----------|\n| `documentId` | String | Google Sheet document ID | ✅ |\n| `sheetId` | String | Sheet tab ID (usually \"0\" for first tab) | ✅ |\n| `enabled` | Boolean | Enable/disable generation | ✅ |\n\n## 💡 Usage Examples\n\n### Basic Usage\n\n```kotlin\n@AndroidSheetLocalization(\n    sheetId = \"0\",\n    documentId = \"YOUR_DOCUMENT_ID\",\n    enabled = true\n)\nclass MyApplication : Application()\n```\n\n### Disable Generation\n\n```kotlin\n@AndroidSheetLocalization(\n    sheetId = \"0\",\n    documentId = \"YOUR_DOCUMENT_ID\",\n    enabled = false // Disable for production builds\n)\nclass MyApplication : Application()\n```\n\n### Multiple Sheets\n\n```kotlin\n@AndroidSheetLocalization(\n    sheetId = \"0\",\n    documentId = \"YOUR_DOCUMENT_ID\"\n)\n@AndroidSheetLocalization(\n    sheetId = \"1\",\n    documentId = \"YOUR_DOCUMENT_ID\"\n)\nclass MyApplication : Application()\n```\n\n## 🔍 Best Practices\n\n1. **Version Control**: Don't commit generated files to version control\n2. **Public Sheets**: Ensure your Google Sheet is publicly accessible\n3. **Consistent Keys**: Use consistent naming conventions for string keys\n4. **Default Values**: Always provide default values in the main language column\n5. **Build Automation**: Integrate with CI/CD for automatic updates\n\n## 🛠️ Troubleshooting\n\n### Common Issues\n\n1. **Compilation Error**: Ensure kapt is properly configured\n2. **Empty Files**: Check if the Google Sheet is publicly accessible\n3. **Missing Languages**: Verify column headers match language codes\n4. **Build Failure**: Clean and rebuild the project\n\n### Debug Tips\n\n```groovy\n// Enable kapt verbose logging\nkapt {\n    arguments {\n        arg(\"verbose\", \"true\")\n    }\n}\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- Inspired by [Flutter Google Sheet localizations generator](https://github.com/aloisdeniel/flutter_sheet_localization)\n- Thanks to all contributors who have helped improve this project\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprongbang%2Fandroid-sheet-localization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprongbang%2Fandroid-sheet-localization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprongbang%2Fandroid-sheet-localization/lists"}