Skip to content

Commit

Permalink
Version 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
raj-squarebits authored Nov 25, 2022
1 parent 0ddaff4 commit 0ea97e6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Add the below dependency in your app build.gradle file:

...
implementation ('com.github.DevnagriAI:android-sdk:1.1.0@aar') { transitive(true) }
implementation ('com.github.DevnagriAI:android-sdk:1.1.1@aar') { transitive(true) }
}
Expand All @@ -41,7 +41,7 @@ Initialise the SDK in your application class and add the API_KEY from DevNagri.
override fun onCreate() {
super.onCreate()
val syncTime:Int = 10 //In minutes
val syncTime:Int = 60 //In minutes
val strings = R.string::class.java.fields.map { it.name }
val arrays = R.array::class.java.fields.map { it.name }
Expand Down Expand Up @@ -71,10 +71,13 @@ Additionally, you need to inject the SDK in each activity, e.g. by creating a ba
# Change Language

In case you don't want to use the system language, you can set a different language in the updateAppLocale method. The language code (locale) needs to be present in a release from Devnagri.
updateAppLocale function may take some time (for example: 3-4 seconds), we suggest you to add a loader before calling updateAppLocale and stop in callback.


val locale = Locale("hi");
DevNagriTranslationSDK.updateAppLocale(activityContext , locale);
//Start loader here
val locale = Locale("hi");
DevNagriTranslationSdk.updateAppLocale(this,locale, completionHandler = {isCompleted, error ->
//Stop loader here
})

Please note that you will get the english text back if your device language is english or you have not set any specific language for the SDK. To get the translation in Hindi, Please update app locale to Hindi as per above method.

Expand Down Expand Up @@ -135,9 +138,9 @@ You can use these methods anywhere in your project and these will provide transl
- If you have multiple modules in your application,
then in each module's base activity override the below method.

override fun getDelegate(): AppCompatDelegate {
return DevNagriTranslationSdk.fetchAppDelegate(this, super.getDelegate())
}
override fun getDelegate(): AppCompatDelegate {
return DevNagriTranslationSdk.fetchAppDelegate(this, super.getDelegate())
}

# Usage

Expand Down
Binary file modified android-sdk.aar
Binary file not shown.
2 changes: 1 addition & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
install:
- FILE="-Dfile=android-sdk.aar"
- mvn install:install-file $FILE -DgroupId=com.github.DevnagriAI -DartifactId=android-sdk -Dversion=1.1.0 -Dpackaging=aar -DpomFile=pom.xml
- mvn install:install-file $FILE -DgroupId=com.github.DevnagriAI -DartifactId=android-sdk -Dversion=1.1.1 -Dpackaging=aar -DpomFile=pom.xml
jdk:
- openjdk11
before_install:
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.DevnagriAI</groupId>
<artifactId>android-sdk</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
<!-- <packaging>aar</packaging>-->
<dependencies>
<dependency>
Expand Down

0 comments on commit 0ea97e6

Please sign in to comment.