ShivaBhattacharjee / AnimeTrix

Animetrix is a project that utilizes the Anilist platform to obtain information on various anime titles, and it combines this data with the Gogoanime API to provide ad-free streaming of anime content.
https://animetrix.vercel.app/
Apache License 2.0
71 stars 40 forks source link

Ability to switch between Romaji and English title #81

Open Ve-Ka opened 1 year ago

Ve-Ka commented 1 year ago

Is your feature request related to a problem? Please describe. Currently your site only display English title for each anime.

Describe the solution you'd like Is it possible to add to .env file or have a frontend implementation of retrieving Romaji title from api.

Additional context Add any other context or screenshots about the feature request here.

image

The Romaji text for this Anime would be: Boku no Kokoro no Yabai Yatsu

ShivaBhattacharjee commented 1 year ago

Actually there are two possible solutions i can come up with give the user ability to change site language and conditionally render the language based on preference (We can store the preference in local storage). Or change entire site language model from English to Romaji whats your opinion ?

ShivaBhattacharjee commented 1 year ago

I also remembered you change the preferences manually

Details.jsx line no 100

<div className="anime-info">
                {animeDetails.title.english && animeDetails.title.english ? (
                  <p className="anime-title">{animeDetails.title.english  animeDetails.title.romaji  animeDetails.title.romaji}</p>
                ) : (
                  <p className="anime-title"> {animeDetails.title.romaji}</p>
                )}
</div>

You can make Romanji as 1st pref instead of English

Ve-Ka commented 1 year ago

I see, I will try with second method whereby changing to animeDetails.title.romaji for my local install. Regarding storing preference in local storage, would you mind providing more details as I do not quite understand.

Furthermore, do you have any discord group created for this repo?

ShivaBhattacharjee commented 1 year ago

I see, I will try with second method whereby changing to animeDetails.title.romaji for my local install. Regarding storing preference in local storage, would you mind providing more details as I do not quite understand.

Furthermore, do you have any discord group created for this repo?

What I meant is to create a radio button with an option to change the episode language to either Romaji or English. The preferences will be saved in the local storage. If English is selected as the user preference, it will render the English title; otherwise, it will render the Romaji title.

You can refer to the following documentation for more information: https://www.freecodecamp.org/news/how-to-use-localstorage-with-react-hooks-to-set-and-get-items/

And no we dont have any dev discord server for this repo however you can contact me here are my socials

https://immashiva.vercel.app/

Ve-Ka commented 1 year ago

I see, I will try with second method whereby changing to animeDetails.title.romaji for my local install. Regarding storing preference in local storage, would you mind providing more details as I do not quite understand. Furthermore, do you have any discord group created for this repo?

What I meant is to create a radio button with an option to change the episode language to either Romaji or English. The preferences will be saved in the local storage. If English is selected as the user preference, it will render the English title; otherwise, it will render the Romaji title.

You can refer to the following documentation for more information: https://www.freecodecamp.org/news/how-to-use-localstorage-with-react-hooks-to-set-and-get-items/

And no we dont have any dev discord server for this repo however you can contact me here are my socials

https://immashiva.vercel.app/

Sorry for the late reply, will implementing this radio button be time consuming, it could be a cool feature to switch on the fly?

ShivaBhattacharjee commented 1 year ago

I see, I will try with second method whereby changing to animeDetails.title.romaji for my local install. Regarding storing preference in local storage, would you mind providing more details as I do not quite understand. Furthermore, do you have any discord group created for this repo?

What I meant is to create a radio button with an option to change the episode language to either Romaji or English. The preferences will be saved in the local storage. If English is selected as the user preference, it will render the English title; otherwise, it will render the Romaji title.

You can refer to the following documentation for more information: https://www.freecodecamp.org/news/how-to-use-localstorage-with-react-hooks-to-set-and-get-items/

And no we dont have any dev discord server for this repo however you can contact me here are my socials

https://immashiva.vercel.app/

Sorry for the late reply, will implementing this radio button be time consuming, it could be a cool feature to switch on the fly?

I will make sure to add it in next update