{"id":21905020,"url":"https://github.com/poviolabs/lingua","last_synced_at":"2025-04-13T06:33:17.140Z","repository":{"id":171943888,"uuid":"635666146","full_name":"poviolabs/Lingua","owner":"poviolabs","description":"A unified localization management tool for iOS \u0026 Android","archived":false,"fork":false,"pushed_at":"2025-03-04T08:29:33.000Z","size":1214,"stargazers_count":58,"open_issues_count":0,"forks_count":6,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-26T23:04:19.355Z","etag":null,"topics":["android","assets","ios","localization","resources"],"latest_commit_sha":null,"homepage":"https://povio.com","language":"Swift","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/poviolabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-05-03T07:35:00.000Z","updated_at":"2025-03-04T08:27:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"563cca4e-fb52-430a-8ee4-c28572ad87e8","html_url":"https://github.com/poviolabs/Lingua","commit_stats":{"total_commits":113,"total_committers":4,"mean_commits":28.25,"dds":0.06194690265486724,"last_synced_commit":"32ee6e74d6813929643b1bbc00b63265bbd7ded1"},"previous_names":["poviolabs/assetgen","poviolabs/lingua"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poviolabs%2FLingua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poviolabs%2FLingua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poviolabs%2FLingua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poviolabs%2FLingua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poviolabs","download_url":"https://codeload.github.com/poviolabs/Lingua/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248674678,"owners_count":21143760,"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","assets","ios","localization","resources"],"created_at":"2024-11-28T16:20:09.520Z","updated_at":"2025-04-13T06:33:17.109Z","avatar_url":"https://github.com/poviolabs.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"Resources/Docs/README.md\"\u003e\n      \u003cimg src=\"Resources/Images/Lingua.png\" width=\"50%\" alt=\"Lingua\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"Resources/Docs/README.md\"\u003e\n        \u003cimg src=\"http://img.shields.io/badge/read_the-docs-2196f3.svg\" alt=\"Documentation\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.swift.org\" alt=\"Swift\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Swift-5.7-orange.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"./LICENSE\" alt=\"License\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Licence-MIT-green.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/poviolabs/Lingua/actions/workflows/tests.yml\" alt=\"Tests Status\"\u003e\n        \u003cimg src=\"https://github.com/poviolabs/Lingua/actions/workflows/tests.yml/badge.svg\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n# Lingua\n\nLingua is a tool designed to streamline the localization process for iOS and Android platforms.\nIt provides a unified solution for generating localization files from a single source, Google Sheets.\n\nThere are several benefits of using the tool:\n\n- Unified translation system for iOS and Android platforms\n\n- Seamless integration with project workflows for automatic translation imports\n\n- Minimized risk of typo errors in localization usage\n\n- Enhanced productivity through intelligent auto-completion and semantic clarity\n\n- Safeguard against referencing non-existent translations\n\n## Setup Google Sheet\n\nIn order to setup Google sheet, we need to complete two steps. First one is to create a sheet with predefined structure, and the second one is to obtain api key and sheet id.\n\n### a. Sheet Document\n\nWe have prepared a tamplate for sheet structure for you. What you have to do is to open the link below and make a copy `File \u003e Make a copy`\n\n[Mobile Localizations Template - Google Sheets](https://docs.google.com/spreadsheets/d/1Cnqy4gZqh9pGcTF_0jb8QGOnysejZ8dVfSj8dgX4kzM)\n\n**Sheet structure**: For detailed information about the sheet structure used in the Lingua localization tool, please refer to the [Sheet Structure Documentation](Resources/Docs/App/SHEET_STRUCTURE.md).\n\n**Important:** Make sure to replace the existing API key in your application with the newly generated one. Also, ensure that the Google Sheet you're trying to access has its sharing settings configured to allow access to anyone with the link. You can do this by clicking on \"Share\" in the upper right corner of the Google Sheet and selecting \"Anyone with the link.\"\n\n### b. Obtain the sheet id\n\nThe sheet id can easly be accessed from the url after you have create a copy of the document tamplate.\n\n`https://docs.google.com/spreadsheets/d/` ***`1GpaPpO4JMleZPd8paSW4qPBQxjImm2xD8yJhvZOP-8w`***\n\n### c. Obtain the API key\n\nHere are the steps to enable the Google Sheets API and create an API key:\n\n1. Go to the [https://console.cloud.google.com/](https://console.cloud.google.com/).\n\n2. If you haven't already, create a new project or select an existing one.\n\n3. In the left sidebar, click on \"APIs \u0026 Services\"\n\n4. Click on \"+ ENABLE APIS AND SERVICES\" at the top of the page.\n\n5. In the search bar, type \"Google Sheets API\" and select it from the list.\n\n6. Click on \"ENABLE\" to enable the Google Sheets API for your project.\n\n7. After the API is enabled, go back to the \"APIs \u0026 Services\" \u003e \"Credendtials\" page.\n\n8. Click on \"CREATE CREDENTIALS\" at the top of the page.\n\n9. In the dropdown, select \"API key\"\n\nWait a bit until the key is generated and an information modal with the message `API key created` will be shown.\n\n## Usage\n\n### 1. macOS App\n\nThe Lingua macOS app provides a user-friendly interface for managing your localization process seamlessly. You can configure your settings and initiate the translation process directly from the app.\n\n#### Installation\n\nYou can download the macOS app from [App Store](https://apps.apple.com/us/app/lingua-tool/id6463116155). Follow the installation guide available on the page to get started with the app.\n\n#### Features and Usage\n\n- **Settings Configuration:** Easily configure and manage your settings through the app's settings panel.\n- **Translation Initiation:** Initiate the translation process with a single click without the need for terminal commands.\n\n### 2. macOS Terminal App\n\nFor those who prefer using the terminal or require scriptable solutions, Lingua offers a terminal app that allows you to manage and initiate translations directly from the command line.\n\n#### Installation\n\nCurrently we support the tool to be installed via Homebrew\n\n```shell\n$ brew tap poviolabs/lingua\n$ brew install lingua\n```\n\n### 3. Linux Terminal App\n\nLingua runs on Linux as well.\n\n#### Installation\n\n1. Download the latest release `Lingua_Linux` from [GitHub Releases](https://github.com/poviolabs/Lingua/releases) based on your machine, either `Lingua_Linux_x86_64` or `Lingua_Linux_arm64`\n\n2. Make the binary executable:\n   \n   ```shell\n   $ chmod +x /path/to/Lingua_Linux_x86_64\n   $ mv Lingua_Linux lingua\n   $ sudo mv /path/to/lingua /usr/local/bin\n   ```\n\n### Terminal Usage\n\nPlease follow below instructions to use Lingua in terminal.\n\n##### Configuration file\n\nCreate a configuration file as a starting point to adapt as your needs, `lingua_config.json` or any other `.json` file.\n\nTo create a sample configuration file as a starting point to adapt to your needs, run `lingua config init`. The tool will create a file named `lingua_config.json` in the directory you are running the Lingua tool.\n\nThen in the configuration file created you need to provide your data, like below:\n\n```json\n{\n   \"localization\": {\n        \"apiKey\": \"\u003cgoogle_api_key\u003e\",\n        \"sheetId\": \"\u003cgoogle_spreadsheet_id\u003e\",\n        \"outputDirectory\": \"path/to/Resources/Localization\"\n    }\n}\n```\n\n##### Output directory\n\nThe output directory property should be the path where you want the tool to create localization files. \n\n* For iOS it can be any directory on your project. \n\n  After you run the command, for the first time, you have to **`Add files to 'YourProject'`** in Xcode.\\\n  **NOTE:** If you are using Xcode 16 and have structured your project using **Folders** instead of **Groups**, this step is not necessary.\n\n* For Android, since the translation are placed in a specific project directory, the output directory it should look something like this: **`path/YourProject/app/src/main/res `**\n\n##### iOS specific\n\nSince iOS does not have a built in feature to access the localization safely, we have made this possible using Lingua tool. In the configuration file you have to provide the path where the default language strings are stored and where the Swift file you want to be created. With that the tool will create **Lingua.swift** with an enumeration to easily access localizations in your app.\n\n```json\n{\n   \"localization\": {\n        \"apiKey\": \"\u003cgoogle_api_key\u003e\",\n        \"sheetId\": \"\u003cgoogle_spreadsheet_id\u003e\",\n        \"outputDirectory\": \"path/to/Resources/Localization\",\n        \"swiftCode\": {\n           \"stringsDirectory\": \"path/to/Resources/Localization/en.lproj\",\n           \"outputSwiftCodeFileDirectory\": \"path/to/Resources/Localization\"\n        }\n    }\n}\n```\n\nNow you can run the tool in terminal, switch to your project directory and run:\n\n**iOS**\n\n```shell\n$ lingua ios /path/to/lingua_config.json\n```\n\n**Android**\n\n```shell\n$ lingua android /path/to/lingua_config.json\n```\n\n**Best Usage Practices**\n\nTo ensure you're leveraging the tool optimally, both locally and in the context of CICD, we recommend you delve into our [Best Usage Practices guide](./Resources/Docs/App/BEST_USAGE_PRACTICES.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoviolabs%2Flingua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoviolabs%2Flingua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoviolabs%2Flingua/lists"}