-
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 #13 from Hugomndez:feature/internationalized
Feature/internationalized
- Loading branch information
Showing
36 changed files
with
449 additions
and
81 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
i18n: { | ||
locales: ['en-US', 'es-MX'], | ||
defaultLocale: 'en-US', | ||
}, | ||
}; |
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
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,5 @@ | ||
{ | ||
"language": "LANGUAGE", | ||
"signIn": "Sign In", | ||
"signOut": "Sign Out" | ||
} |
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,7 @@ | ||
{ | ||
"title": "We make all exchange rates visible.", | ||
"subTitle": "We bring real-time information from the world's most important exchange houses and currencies.", | ||
"coins": "Coins", | ||
"commissions": "Commissions", | ||
"updated": "Updated" | ||
} |
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,5 @@ | ||
{ | ||
"title": "The next revolution in cryptocurrency exchange.", | ||
"subTitle": "Batatabit helps you navigate between the different prices and trends.", | ||
"callToAction": "See Our Plans" | ||
} |
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,25 @@ | ||
{ | ||
"title": "Choose the plan that best suits you.", | ||
"subTitle": "Any plan gives you full access to our platform.", | ||
"recommended": "Recommended", | ||
"plans": [ | ||
{ | ||
"payment": "Monthly payment", | ||
"price": 19, | ||
"description": "Limited access", | ||
"callToAction": "Choose this" | ||
}, | ||
{ | ||
"payment": "Annual payment", | ||
"price": 99, | ||
"description": "You save $129 compared to the monthly plan.", | ||
"callToAction": "Choose this" | ||
}, | ||
{ | ||
"payment": "Annual payment", | ||
"price": 199, | ||
"description": "Unlimited access", | ||
"callToAction": "Choose this" | ||
} | ||
] | ||
} |
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,3 @@ | ||
{ | ||
"title": "Subscribe Today" | ||
} |
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,22 @@ | ||
{ | ||
"title": "We create a product like no other.", | ||
"subTitle": "Reliable and designed for your daily use.", | ||
"details": [ | ||
{ | ||
"name": "Real time", | ||
"description": "Our API takes minute-by-minute information on the rates that most determine behavior." | ||
}, | ||
{ | ||
"name": "There are no hidden fees", | ||
"description": "Neither in the purchase nor at the time of exit, Batabit always shows you the real cost of what you are purchasing." | ||
}, | ||
{ | ||
"name": "Compare currencies", | ||
"description": "Neither in the purchase nor at the time of exit, Batabit always shows you the real cost of what you are purchasing." | ||
}, | ||
{ | ||
"name": "Reliable information", | ||
"description": "Our sources are 100% verified and we continue to audit their content as they update." | ||
} | ||
] | ||
} |
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,5 @@ | ||
{ | ||
"language": "IDIOMA", | ||
"signIn": "Ingresar", | ||
"signOut": "Salir" | ||
} |
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,7 @@ | ||
{ | ||
"title": "Visibilizamos todas las tasas de cambio.", | ||
"subTitle": "Traemos información en tiempo real de las casas de cambio y las monedas más importantes del mundo.", | ||
"coins": "Monedas", | ||
"commissions": "Comisiones", | ||
"updated": "Actualizado" | ||
} |
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,5 @@ | ||
{ | ||
"title": "La próxima revolución en el intercambio de criptomonedas.", | ||
"subTitle": "Batatabit te ayuda a navegar entre los diferentes precios y tendencias.", | ||
"callToAction": "Conoce Nuestros Planes" | ||
} |
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,25 @@ | ||
{ | ||
"title": "Escoge el plan que mejor se ajuste a ti.", | ||
"subTitle": "Cualquier plan te da acceso completo a nuestra plataforma.", | ||
"recommended": "Recomendado", | ||
"plans": [ | ||
{ | ||
"payment": "Pago mensual", | ||
"price": 19, | ||
"description": "Acceso limitado", | ||
"callToAction": "Escoger este" | ||
}, | ||
{ | ||
"payment": "Pago anual", | ||
"price": 99, | ||
"description": "Ahorras $129 comparado al plan mensual.", | ||
"callToAction": "Escoger este" | ||
}, | ||
{ | ||
"payment": "Pago anual", | ||
"price": 199, | ||
"description": "Acceso ilimitado", | ||
"callToAction": "Escoger este" | ||
} | ||
] | ||
} |
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,3 @@ | ||
{ | ||
"title": "Conócelo Hoy" | ||
} |
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,22 @@ | ||
{ | ||
"title": "Creamos un producto sin comparación.", | ||
"subTitle": "Confiable y diseñado para su uso diario.", | ||
"details": [ | ||
{ | ||
"name": "Tiempo real", | ||
"description": "Nuestra API toma información minuto a minuto sobre las tasas que más determinan el comportamiento." | ||
}, | ||
{ | ||
"name": "No hay tasas escondidas", | ||
"description": "Ni en la compra o al momento de exit, Batabit siempre te muestra el costo real de lo que estás adquiriendo." | ||
}, | ||
{ | ||
"name": "Compara monedas", | ||
"description": "Ni en la compra o al momento de exit, Batabit siempre te muestra el costo real de lo que estás adquiriendo." | ||
}, | ||
{ | ||
"name": "Información confiable", | ||
"description": "Nuestras fuentes están 100% verificadas y continuamos auditando su contenido mientras actualizan." | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.section { | ||
display: flex; | ||
flex-direction: column; | ||
width: 50%; | ||
justify-content: center; | ||
align-items: center; | ||
gap: 5px; | ||
} | ||
|
||
.title { | ||
font-size: 1.4rem; | ||
font-weight: 500; | ||
font-style: normal; | ||
line-height: 1.8rem; | ||
margin-bottom: 4px; | ||
color: var(--just-white); | ||
} | ||
|
||
.section a { | ||
font-size: 1.4rem; | ||
font-weight: 500; | ||
font-style: normal; | ||
line-height: 1.8rem; | ||
padding: 4px; | ||
text-decoration: none; | ||
color: var(--just-white); | ||
} | ||
|
||
.section a:hover, | ||
.section a:active, | ||
.section a:focus { | ||
border: 1px solid var(--just-white); | ||
} | ||
|
||
.active { | ||
border: 1px solid var(--just-white); | ||
} |
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 { useTranslation } from 'next-i18next'; | ||
import Link from 'next/link'; | ||
import { useRouter } from 'next/router'; | ||
import styles from './LocaleOptions.module.css'; | ||
|
||
const LocaleOptions = () => { | ||
const { locale, locales, asPath } = useRouter(); | ||
const { t } = useTranslation('common'); | ||
|
||
// Locales aren't configured | ||
if (locale == undefined || locales == undefined) return null; | ||
|
||
return ( | ||
<section className={styles.section}> | ||
<p className={styles.title}>{t('language')} :</p> | ||
{/* Use this code when you want to let user override browser language preference */} | ||
{/* {locales.map(loc => ( | ||
<form action='/api/language' method='POST' key={loc}> | ||
<input type='hidden' name='preferredLocale' value={loc} /> | ||
<button type='submit'>{loc}</button> | ||
</form> | ||
))} */} | ||
{locales.map((loc, index) => { | ||
return ( | ||
<div key={index}> | ||
<Link href={asPath} locale={loc}> | ||
<a className={loc === locale ? styles.active : ''}>{loc}</a> | ||
</Link> | ||
</div> | ||
); | ||
})} | ||
</section> | ||
); | ||
}; | ||
|
||
export default LocaleOptions; |
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 @@ | ||
export { default as LocaleOptions } from './LocaleOptions'; |
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
Oops, something went wrong.