Translate (i18n) Module in Kotlin to use in Android

Overview

Translate (i18n) Module in Kotlin to use in Android

Library create by Anartz Mugika ([email protected])

Instructions to download library from Maven

Download

In select project build.gradle file:

	allprojects {
		repositories {
			jcenter()
		}
	}

In select module build.gradle file with gradle >= 3.0 use 'implementation' and gradle < 3.0 use 'compile':

	dependencies {
    	        implementation 'amldev.i18n:library:1.4'
    	}

Next version features

  • Adapt to Devices with SDK 25 or more recent.
  • Add more languages to use in Dialog selection.
  • Optimize code with one objective: Easy use.

New version features

  • Update Gradle
  • Adapt with new SDKs (remove depprecated)
  • Distribute with Maven

Instructions in English

Library to create apps in different languages. For now it is only prepared for English, Spanish and Basque. The instructions for Android Studio are very simple, we clone the repository and after that, we do in our Android project that we want to import the module.

  • File / New / Import Module
  • Select the module "i18n"

We recompilate the project and we already have prepared to make use of this bookshop. To make the correct use in the library, we have to add the following in the activity:

//To use LocaleHelper select language
    override fun attachBaseContext(base: Context) {
        super.attachBaseContext(LocaleHelper.onAttach(base))
    }

And to do the different operations of the library:

  • Change to select language:
    LocaleHelper.changeLang(this, lang)
  • Restart App (make this action after change lang automatically)
    LocaleHelper.restartApp(this)

Instrucciones en Español.

Librería para crear apps en diferentes lenguajes. Por ahora solo está preparada para inglés, español y euskera. Las instrucciones para Android Studio son muy simples, clonamos el repositorio y después de ello, hacemos en nuestro proyecto de Android que queremos importar el módulo.

  • File / New / Import Module
  • Seleccionamos el módulo "i18n"

Recompilamos el proyecto y ya tenemos preparado para hacer uso de esta librería. Para hacer el uso correcto en la librería, tenemos que añadir lo siguiente en la actividad:

//To use LocaleHelper select language
    override fun attachBaseContext(base: Context) {
        super.attachBaseContext(LocaleHelper.onAttach(base))
    }

Y para hacer las diferentes operaciones de la librería:

  • Guardar un nuevo idioma:
    LocaleHelper.changeLang(this, lang)
  • Reiniciar la app (normalmente va junto con el cambio de idioma)
    LocaleHelper.restartApp(this)

MIT License

Copyright (c) 2018 Anartz Mugika Ledo

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You might also like...
Xposed module to set the Signature Scheme for Android 30 = to 1. This allows system apps to be modified

SetSignatureSchemeV1 Xposed module to set the Signature Scheme for Android 30+ to 1. This allows system apps to be modified. This module makes the met

Communicating between Wear OS and Android device using the OpWear module and a sample of displaying real-time camera on the watch and sending commands to the mobile by Wear OS.
Communicating between Wear OS and Android device using the OpWear module and a sample of displaying real-time camera on the watch and sending commands to the mobile by Wear OS.

OpWear-Cam Communicating between Wear OS and Android device using the OpWear module and a sample of displaying real-time camera on the watch and sendi

Ein LabyMod-Module für SimpleCloud

LabyMod Module Ein LabyMod-Module für SimpleCloud Download · Report Bug · SimpleCloud · LabyMod Docs Was kann dieses Module? Das ist ein CloudModule f

Easy Note: Building a Notes app using MVVM, JetPack Compose with a clean multi-module architecture approach.
Easy Note: Building a Notes app using MVVM, JetPack Compose with a clean multi-module architecture approach.

Easy Note Easy Note: Notes app using JetPack Compose and MVVM with a clean architecture approach. This app shows the usage of the new Navigation Archi

SIMNumberSetter - A small Xposed module to set the SIM card's phone subscriber number
SIMNumberSetter - A small Xposed module to set the SIM card's phone subscriber number

SIM Number Setter SIM Number Setter is a small Xposed module that invokes normal

AnyText - An Xposed module trying to hook TextView in any activities

AnyText What's this This application provides features to modify any TextView in

Xposed module for Snapchat.

SnapMod Xposed module for Snapchat. Setup To set SnapMod up, download and install the latest apk from here. When you open it, it will ask to install s

Media Provider Manager - An Xposed module intended to prevent media storage abuse
Media Provider Manager - An Xposed module intended to prevent media storage abuse

Media Provider Manager - An Xposed module intended to prevent media storage abuse

Xposed module which will set location where you want without effect mock location.
Xposed module which will set location where you want without effect mock location.

GPS Setter Support/Discussion: XDA thread As most of GPS spoof app not working anymore coz some are old and some are not proper implement with current

Releases(1.4)
Owner
Anartz Mugika Ledo
[{#front [#mobile: {#android, #kotlin-java, #ionic}}, {#web: {#angular, #material, #bs}}], {#back: [{#graphql, #symfony,#express, #mongodb}]}] TG: anartz_naiz
Anartz Mugika Ledo
Abel Suviri 6 Dec 16, 2022
SimpleCloud-haste-module - SimpleCloud module for uploading the logs of your services to hastebin

SimpleCloud Haste Module A SimpleCloud Module for uploading the current logs of

NeverStopGaming.net 5 Mar 6, 2022
BuildConfiguration information for use in multi-module, or Kotlin Multiplatform common code

component-build-configuration A small library supporting Kotlin Multiplatform for utilizing BuildConfiguration details from common code and across mod

Matthew Nelson 2 Mar 6, 2022
A simple xposed module that helps you use your AdGuard subscription in multiple devices

DualGuard A simple xposed module that helps you use your AdGuard subscription in multiple (>3) devices. Monstor ahead! / 警告 This is NOT a module that

null 7 Oct 2, 2022
An android app built using Kotlin following Multi-Module Clean Architecture MVVM

Notflix ??️ Work In Progress ?? An android app built using Kotlin that consumes TMDB API to display current trending, upcoming and popular movies ?? a

Victor Kabata 290 Dec 30, 2022
This project shows trending github repositories using MVI (Model View Intent) using kotlin flows and multi module clean architecture

GithubTrendingMVIFlow Build Architecture: This project shows trending github repositories using MVI (Model View Intent) using kotlin flows and multi m

Zulqurnain Haider 0 Jun 2, 2022
Repository for the Android app core module.

EU Digital COVID Certificate App Core - Android About • Development • Documentation • Support • Contribute • Contributors • Licensing About This repos

null 35 May 31, 2022
A minimalistic Face Recognition module which can be easily incorporated in any Android project.

Real Time Face Recognition with TfLite A minimalistic Face Recognition module which can be easily incorporated in any Android project. Key Features Fa

Abhinav Sharma 2 Jun 21, 2022
Mixed Xposed+Magisk module for customization of AOSP-based Android 12+

This is a mixed Xposed+Magisk module, which is made to allow customizations that are not originally designed in AOSP (Android Open Source Project).

Siavash 654 Jan 4, 2023
Android Package Inspector - dynamic analysis with api hooks, start unexported activities and more. (Xposed Module)

Inspeckage - Android Package Inspector Inspeckage is a tool developed to offer dynamic analysis of Android applications. By applying hooks to function

acpm 2.5k Jan 8, 2023