{"id":20316473,"url":"https://github.com/javinator9889/localemanager","last_synced_at":"2026-04-29T12:32:12.522Z","repository":{"id":114247059,"uuid":"162595335","full_name":"Javinator9889/LocaleManager","owner":"Javinator9889","description":"Android Locale Manager compatible with multiple versions - change your Android App language easily","archived":false,"fork":false,"pushed_at":"2018-12-27T20:57:59.000Z","size":592,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-05T04:50:19.479Z","etag":null,"topics":["android","android-library","android-locale","gradle","java","jcenter-bintray","language","library","locale","localemanager","maven","multilingual","multiple-language-android"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Javinator9889.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":"2018-12-20T15:09:32.000Z","updated_at":"2024-01-03T00:56:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"228ffbde-3ecf-4308-92df-42050094c916","html_url":"https://github.com/Javinator9889/LocaleManager","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Javinator9889/LocaleManager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Javinator9889%2FLocaleManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Javinator9889%2FLocaleManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Javinator9889%2FLocaleManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Javinator9889%2FLocaleManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Javinator9889","download_url":"https://codeload.github.com/Javinator9889/LocaleManager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Javinator9889%2FLocaleManager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32426571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T12:24:25.982Z","status":"ssl_error","status_checked_at":"2026-04-29T12:24:24.439Z","response_time":110,"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":["android","android-library","android-locale","gradle","java","jcenter-bintray","language","library","locale","localemanager","maven","multilingual","multiple-language-android"],"created_at":"2024-11-14T18:26:19.947Z","updated_at":"2026-04-29T12:32:12.506Z","avatar_url":"https://github.com/Javinator9889.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LocaleManager\nAndroid Locale Manager compatible with multiple versions - change your Android App language easily\n\n[![Build Status](https://travis-ci.com/Javinator9889/LocaleManager.svg?branch=master)](https://travis-ci.com/Javinator9889/LocaleManager)\n[![Android X - latest version](https://img.shields.io/badge/Android%20X%20-v1.1X-green.svg)](https://bintray.com/javinator9889/maven/LocaleManager/1.1X)\n[![Android - latest version](https://img.shields.io/badge/AppCompat%20-v1.1-green.svg)](https://bintray.com/javinator9889/maven/LocaleManager/1.1)\n\n## Index\n\n 1. [Introduction](#introduction)\n 2. [Installation](#installation)\n 3. [Usage](#usage)\n 4. [Contributing](#contributing)\n 5. [License](#license)\n\n### Introduction\nNowadays, creating an Android application (that aspires to be popular) needs to be multilingual.\nIf you are an experienced developer, you may have noticed that there is no **pre-built** Android\nsystem for changing manually the *application language*. However, from Android central they encouragingly\nrecommend us to **not to change the language manually**, as some incompatibilities can appear or errors.\n\nBut there is an extra feature that it is not *so much difficult* to implement and it is an extra bonus to\nour actual and future users that they can switch from any language to another with just clicking a button.\nFor that reason, and with the intention to save developing time, I decided to create this library\nthat allows you to build a **simple multilingual application**, without *losing any capability*.\n\nWith just **inheriting** from some specific required classes, your application will be *fully multilingual*.\nIf you want to customize that settings, directly go to the [usage step](#usage) and setup this lib as you want.\n\n### Installation\nFirst, you must include support with **JCenter** at your own package:\n\n#### Gradle\nAt your **top-level `build.gradle`**, add `jcenter()` to your repositories section:\n```groovy\nrepositories {\n    ...\n    jcenter()\n}\n```\n\nThen, you should be able (if there is no error) to include the repository. At your local `build.gradle`\n(application level), add the following at the `dependencies` section:\n```groovy\ndependencies {\n    // If you are deploying an Android X based application\n    implementation 'com.github.javinator9889:localemanager:1.1X'\n\n    // If you are deploying an Android AppCompat based application\n    implementation 'com.github.javinator9889:localemanager:1.1'\n}\n```\n\nSync your gradle settings for applying changes and you are done!\n\n#### Maven\nAt your **top-level** pom file, include the following:\n```xml\n\u003crepositories\u003e\n  \u003crepository\u003e\n    \u003cid\u003ecentral\u003c/id\u003e\n    \u003cname\u003ebintray\u003c/name\u003e\n    \u003curl\u003ehttp://jcenter.bintray.com\u003c/url\u003e\n  \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\nFinally, include at your *dependencies* section one of the following declarations, depending if\nyou are deploying an Android app based on *Android X* or *AppCompat*:\n```xml\n\u003c!-- AppCompat dependency --\u003e\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.javinator9889\u003c/groupId\u003e\n  \u003cartifactId\u003elocalemanager\u003c/artifactId\u003e\n  \u003cversion\u003e1.1\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\n```xml\n\u003c!-- Android X dependency --\u003e\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.javinator9889\u003c/groupId\u003e\n  \u003cartifactId\u003elocalemanager\u003c/artifactId\u003e\n  \u003cversion\u003e1.1X\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\n### Usage\nAs explained at the introduction, using this module is quite simple. It is as simple that\nyou always must follow this steps:\n\n1. Make your `application` class inherit from `BaseApplication`. If you do not have one, just create it.\n2. Each single activity you want to have a **translated one** must inherit from `BaseActivity`.\n3. Each single fragment you want to have a **translated one** must inherit from `BaseFragment`.\n3. Each single service (or job) you want to have a **translated one** must inherit from `BaseService` or `BaseJobService`.\n4. When applying the new language, you must call to the `localeManager` object placed on your `application` class and set\nthe new `Language`.\n\nBy following these steps, you should be able to make your application multilingual. You can read the\n[docs](https://javinator9889.github.io/LocaleManager) for getting more information about classes and their possibilities.\n\nNow a little example for start working on your app:\n```java\nimport javinator9889.localemanager.application.BaseApplication;\n\npublic class YourApplication extends BaseApplication {\n    @Override\n    @Nullable\n    protected SharedPreferences getCustomSharedPreferences(@NonNull Context base) {\n        // If you are planning to store the user language in a custom shared preferences, create \n        // and initialize them here.\n        // If not, you can safely return \"null\"\n        \n        return base.getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n        // OR\n        return null;\n    }    \n}\n```\n\n\n```java\n\nimport javinator9889.localemanager.activity.BaseAppCompatActivity;\nimport javinator9889.localemanager.utils.languagesupport.LanguagesSupport;\n\npublic class YourActivity extends BaseAppCompatActivity implements Button.OnClickListener {\n    // At this activity, we will change out language by implementing an arbitrary button selector\n    @Override\n    protected void onCreate(@Nullable Bundle savedInstanceState) {\n        /* \n        Initialize some IDs, buttons and set content view.\n        */\n    }\n    \n    @Override\n    public void onClick(View view) {\n        switch (view.getId()) {\n            // Arbitrary ID supposedly defined above\n            case idEnglishButton:\n                // Here we are going to change our application language to English\n                YourApplication.localeManager.setNewLocale(this, LanguagesSupport.Language.ENGLISH); \n                recreate(); // Restart the activity - from API 11\n                break;\n            case idSpanishButton:\n                // Here we are going to change our application language to English\n                YourApplication.localeManager.setNewLocale(this, LanguagesSupport.Language.SPANISH); \n                recreate(); // Restart the activity - from API 11\n                break;\n            default:\n                // Here we are going to change our application language to the Android system \n                // default\n                YourApplication.localeManager.setNewLocale(this, LanguagesSupport.Language.SYSTEM); \n                recreate(); // Restart the activity - from API 11\n                break;\n        }\n    }\n}\n```\n\nAs you can see, with that simple steps you can easily change dynamically your application language.\n\n![English](/screen-captures/english.png)\n![Spanish](/screen-captures/spanish.png)\n![Russian](/screen-captures/russian.png)\n![System](/screen-captures/system.png)\n\n### Contributing\nAs you can see, developing this application is **quite simple**: the only necessary requirement \nis to understand *how Android locales works* and then just repeat the same process over and over.\n\nIf you want to contribute, I probably need your help:\n\n+ Share and like **this repository**, so much more people can enjoy it and its benefits 🗣❤\n+ Comment *any bugs* or problems you have: there will be **an entire community** wanting to help \nyou 👥\n+ Commit *your own* implementations or enhancements you consider necessary - there are only a \n*few languages* supported, so you can commit the ones that are missing 🧠\n\nLets make the *Android community* stronger and help the others deploying their own applications 💪\n\n### License\n \n     Copyright © 2018 - present | Javinator9889\n \n     This program is free software: you can redistribute it and/or modify\n     it under the terms of the GNU General Public License as published by\n     the Free Software Foundation, either version 3 of the License, or\n     (at your option) any later version.\n \n     This program is distributed in the hope that it will be useful,\n     but WITHOUT ANY WARRANTY; without even the implied warranty of\n     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n     GNU General Public License for more details.\n \n     You should have received a copy of the GNU General Public License\n     along with this program.  If not, see https://www.gnu.org/licenses/.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavinator9889%2Flocalemanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjavinator9889%2Flocalemanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavinator9889%2Flocalemanager/lists"}