-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #249 from markalbrand56/front_searchbar
language addition home
- Loading branch information
Showing
10 changed files
with
200 additions
and
15 deletions.
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions
36
uniEmpleos/src/components/LanguageButton/LanguageButton.jsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React, { useState } from "react" | ||
import { useTranslation } from "react-i18next" | ||
import i18n from "../../i18n" | ||
import style from "./LanguageButton.module.css" | ||
|
||
const LanguageButton = () => { | ||
const [language, setLanguage] = useState("es") | ||
|
||
const changeLanguage = () => { | ||
if (language === "es") { | ||
setLanguage("en") | ||
i18n.changeLanguage("en") | ||
} else { | ||
setLanguage("es") | ||
i18n.changeLanguage("es") | ||
} | ||
} | ||
|
||
return ( | ||
<div className={style.languageButton}> | ||
<button | ||
type="button" | ||
className={style.mainButton} | ||
onClick={changeLanguage} | ||
> | ||
<img | ||
src={language === "es" ? "/images/en.svg" : "/images/es.svg"} | ||
alt="English" | ||
className={style.imgButton} | ||
/> | ||
</button> | ||
</div> | ||
) | ||
} | ||
|
||
export default LanguageButton |
21 changes: 21 additions & 0 deletions
21
uniEmpleos/src/components/LanguageButton/LanguageButton.module.css
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.languageButton{ | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
margin: 0; | ||
position: fixed; | ||
bottom: 10px; | ||
right: 10px; | ||
} | ||
|
||
.mainButton{ | ||
border-radius: 10px; | ||
background-color: transparent; | ||
margin: 0; | ||
} | ||
|
||
.imgButton{ | ||
height: 40px; | ||
width: 40px; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import i18n from "i18next" | ||
import { initReactI18next } from "react-i18next" | ||
import enTranslations from "./locales/en/translation.json" | ||
import esTranslations from "./locales/es/translation.json" | ||
|
||
i18n.use(initReactI18next).init({ | ||
resources: { | ||
en: { | ||
translation: enTranslations, | ||
}, | ||
es: { | ||
translation: esTranslations, | ||
}, | ||
}, | ||
lng: "en", | ||
interpolation: { | ||
escapeValue: false, | ||
}, | ||
}) | ||
|
||
export default 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"home": { | ||
"title1": "What is UniEmpleos?", | ||
"desc1": "UniEmpleos is a platform that enables students from various universities in Guatemala to find job offers and professional internships.", | ||
"title2": "How does it work?", | ||
"desc2": "Companies publish their job offers and students can apply to them. The companies can view the profiles of the students and contact them." | ||
}, | ||
"intro": { | ||
"description": "Guatemalan lawyer with experience in strategic analysis, political analysis and advisory to boards. Currently, I am the Executive President of the National Civic Movement. I participated in the 2022-2023 cohort of the Millennium Leadership Program at the Atlantic Council. On this website, I share reflections and resources to understand the sociopolitical environment in which we live." | ||
}, | ||
"podcast": { | ||
"title": "Podcast", | ||
"listen": "Listen", | ||
"description": "We educate about the impact that politics, social relations, and economics have on society. We motivate to exercise individual sovereignty to achieve positive impacts on society. Being increasingly aware of the potential impact of our actions." | ||
}, | ||
"resources": { | ||
"title": "Resources", | ||
"categories": [ | ||
"All", | ||
"Press", | ||
"News", | ||
"Articles" | ||
] | ||
}, | ||
"analysis": { | ||
"title": "Analysis" | ||
}, | ||
"contact": { | ||
"title": "Get in Touch", | ||
"subtitle": "Contact", | ||
"collaborate": "I want to collaborate", | ||
"motto": "The republic is still alive", | ||
"address": "Address", | ||
"media": "Social Media" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"home": { | ||
"title1": "¿Qué es UniEmpleos?", | ||
"desc1": "UniEmpleos es una plataforma que permite a los estudiantes de distintas Universidades de Guatemala encontrar ofertas de trabajo y prácticas profesionales.", | ||
"title2": "¿Cómo funciona?", | ||
"desc2": "Las empresas publican sus ofertas de trabajo y los estudiantes pueden postular a ellas. Las empresas pueden ver los perfiles de los estudiantes y contactarlos." | ||
}, | ||
"intro": { | ||
"description": "Abogado guatemalteco con experiencia en análisis estratégico, análisis político y asesorías a directivas. Actualmente soy Presidente Ejecutivo del Movimiento Cívico Nacional. Participé en el cohorte 2022-2023 del Millenium Leadership Program del Atlantic Council. En este website comparto reflexiones y recursos para comprender el entorno sociopolítico en el que vivimos." | ||
}, | ||
"podcast": { | ||
"title": "Podcast", | ||
"listen": "Escuchar", | ||
"description": "Educamos sobre el impacto que la política, relaciones sociales y economía tiene en la sociedad. Motivamos a ejercer la soberanía individual para lograr impactos positivos en la sociedad. Ser cada vez más conscientes del potencial impacto de nuestras acciones." | ||
}, | ||
"resources": { | ||
"title": "Recursos", | ||
"categories": [ | ||
"Todo", | ||
"Prensa", | ||
"Noticias", | ||
"Artículos" | ||
] | ||
}, | ||
"analysis": { | ||
"title": "Análisis" | ||
}, | ||
"contact": { | ||
"title": "Ponte en Contacto", | ||
"subtitle": "Contacto", | ||
"collaborate": "Quiero colaborar", | ||
"motto": "La república sigue viva", | ||
"address": "Address", | ||
"media": "Redes Sociales" | ||
} | ||
} |
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
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