This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
implementation fileTree(dir: "libs", include: ["*.jar"]) | |
api basic.core_ktx_dependency | |
api basic.app_compat_dependency | |
api basic.material_dependency | |
api basic.constraint_dependency | |
//Koin | |
api koin.koin_dependency | |
api koin.koin_viewmodel_dependency | |
//Navigation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
implementation project (':core') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
core | |
|_build.gradle (common dependencies) | |
|_app | |
|_build.gradle (just specific dependencies) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ext { | |
versions = [ | |
compile_sdk_version : "30", | |
buil_tools_version : "30.0.3", | |
min_sdk_version : "26", | |
target_sdk_version : "30", | |
java_version : JavaVersion.VERSION_11.toString(), | |
koin_version : '2.2.3', | |
koin_viewmodel_version : "2.2.2", | |
core_ktx_version : "1.3.2", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.library' | |
... | |
dependencies { | |
implementation fileTree(dir: "libs", include: ["*.jar"]) | |
api basic.values() | |
api koin.values() | |
api navigation.values() | |
//Retrofit, okhttp3, moshi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
implementation project (':core') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import i18n from "i18next"; | |
import { initReactI18next } from "react-i18next" | |
import Backend from 'i18next-http-backend'; | |
import LanguageDetector from 'i18next-browser-languagedetector'; | |
const DETECTION_OPTIONS = { | |
order: ['navigator'] | |
}; | |
i18n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "title", | |
"section": [ | |
{ | |
"title": "Some title", | |
"subtitle": "Some subtitle", | |
"description": "Some description" | |
}, | |
{ | |
"title": "Some title 1", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ReactDOM from 'react-dom' | |
import './index.css' | |
import App from './App' | |
import reportWebVitals from './reportWebVitals' | |
import i18n from './i18n' | |
import { I18nextProvider } from 'react-i18next' | |
import React, { Suspense } from 'react' | |
ReactDOM.render( | |
<React.StrictMode> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import './App.css' | |
import SectionItem from './components/section-item/sectionItem' | |
import { useTranslation } from 'react-i18next' | |
import React from 'react' | |
export default function App () { | |
const { t } = useTranslation() | |
var section = t('section', { returnObjects: true }) // Return the array from my local JSON file |
OlderNewer