Njong392/Abbreve

FEATURE: Having the possibility to have abbreviations available for different languages.

Opened this issue ยท 15 comments

Description

The goal is to also have the possibility of having abbreviations available for other languages. For example, for French, we should have a route "/fr", and on this route, only the abbreviations in French will be available, and so on for other languages. For this, we could use React Router.

Screenshots

No response

Hi there! I'm interested in tackling this issue. Could you please provide more details on how you envision implementing language-specific routes with abbreviations using React Router? I'd like to understand the requirements better so I can contribute effectively. Looking forward to your guidance!

Maybe we could use server routes for the translation and a simple drop-down menu in the frontend for selecting a language.

I could add the German abbreviations if this feature goes into production...

Maybe we could use server routes for the translation and a simple drop-down menu in the frontend for selecting a language.

One potential approach is to append the API to link each slang with its corresponding language. This would enable us to display only those slangs that belong to the language selected.

Would that mean we need to translate the site too? Whoa, this is getting huge hahaha. Uhm...

Hello @Apurv428

Basically, what I have in mind is that in the /public/server/db folder there should be other subfolders, the en subfolder will be for English abbreviations, fr for French abbreviations and so on ...
Now we'll need to create other routes (the number of routes will be the number of sub-folders in /public/server/db).
The main route will be that of the English site.

This would be easier if the project were based on a framework like NextJS, but as it isn't, we'll have to use React Router to manage routing.

I don't know if that's clear enough.

P.S. It's more or less the same principle here https://github.com/ln-dev7/world-portfolios/ to have portfolios from several countries.

Would that mean we need to translate the site too? Whoa, this is getting huge hahaha. Uhm...

I mean most people speak English and the site is pretty self explanatory...

This would be easier if the project were based on a framework like NextJS, but as it isn't, we'll have to use React Router to manage routing.

I mean in the frontend we wouldnt even need react router. As I said we could put a mini drop-down next to the search field (Just smth like EN or DE) where you can select a language. And then save the preferred language in local storage...

I would like to work on this

Hello @Apurv428

Basically, what I have in mind is that in the /public/server/db folder there should be other subfolders, the en subfolder will be for English abbreviations, fr for French abbreviations and so on ... Now we'll need to create other routes (the number of routes will be the number of sub-folders in /public/server/db). The main route will be that of the English site.

This would be easier if the project were based on a framework like NextJS, but as it isn't, we'll have to use React Router to manage routing.

I don't know if that's clear enough.

P.S. It's more or less the same principle here https://github.com/ln-dev7/world-portfolios/ to have portfolios from several countries.

Understood your approach. However, how do we ascertain the language to which a slang belongs?

I'm a bit late to the conversation as I always am (ahem), but how easy would all of this be, if we had a backend in place. I mean a proper backend btw, not the way we have aabbreviations stored now

Maybe vercel Databases?

Understood your approach. However, how do we ascertain the language to which a slang belongs?

Select from drop-down and then request to e.g.

/public/de/ka.json

Maybe vercel Databases?

Like Mongodb database, set up a small backend with express. Nothing too complicated

Yes, that sounds good, but how will people add abbreviations?

Yes, that sounds good, but how will people add abbreviations?

Just the way they add now. And every time a PR gets merged, there is a github action that runs some script to add that file as a document in the db. here's the project I got inspo from.