Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ln-dev7 opened this issue Feb 4, 2024 · 15 comments

Comments

@ln-dev7
Copy link

ln-dev7 commented Feb 4, 2024

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

@Apurv428
Copy link

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!

@joel-wlf
Copy link
Contributor

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

@joel-wlf
Copy link
Contributor

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

@Apurv428
Copy link

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.

@Njong392
Copy link
Owner

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

@ln-dev7
Copy link
Author

ln-dev7 commented Feb 12, 2024

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.

@joel-wlf
Copy link
Contributor

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...

@joel-wlf
Copy link
Contributor

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

@Apurv428
Copy link

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?

@Njong392
Copy link
Owner

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

@joel-wlf
Copy link
Contributor

Maybe vercel Databases?

@joel-wlf
Copy link
Contributor

joel-wlf commented Feb 16, 2024

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

@Njong392
Copy link
Owner

Maybe vercel Databases?

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

@joel-wlf
Copy link
Contributor

joel-wlf commented Feb 17, 2024

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

@Njong392
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants