Hey everyone - I am just starting to do my series of projects. I wanted to share my tribute page to Blanca Canales - a Puerto Rican Nationalist. I experimented with a bit of Javascript, let me know what you think!
Quick question - for Javascript (I know it’s not required but am testing something) - does anyone know of a script I could use that would transform my tab containers from English (en) to Spanish (es)? I have seen some java code on Google/some forums:
I.e. JavaScript/jQuery - Get text and translate it - Stack Overflow - what would be a simple way I could integrate a Javascript “translate” button for the tabs (i.e. someone can click “translate to spanish” and all of the content in the tabs go from English > Spanish and you can change it back)? Thank you.
I’ve loved seeing the projects and discussions so far - hope everyone is doing well.
I don’t know enough about JS (yet!) to help you, but good job on your page! I like your info tabs a lot. The photo (pencil drawing?) of the subject give a nice focal point as well.
Hey - thanks so much for your feedback. I tried to go for a simple look. I am going to experiment with these pages over the next week before fully submitting my projects. I appreciate your insight.
I have been learning Javascript for a while now. I will give it a shot.
I can’t promise anything and it may take a while.
This will give me a good project to work on.
One thing you can do if your interested is provide me the text you want to use. I don’t know Spanish so I would have to use an online translator. That may not be as accurate as your translation.
I may have come up with a simple solution. Is it alright to download your code so I can work on it in VSCode? It will be easier to work on, then using CodePen.
I have checked out the website - what a wonderful learning opportunity. Thanks for teaching me this and taking the time to implement/write this code. I am looking forward to the end result. I appreciate your time.
The script tag at the bottom of the Body has the Javascript for the plugin, and there is a Div tag just inside the Main tag with the ID it needs to show up on the page. You can put the Div wherever you want. It translates the whole page and you can add other languages as well.
Thank you so much - the implementation of this plugin is impressive and super helpful. Taught me a great Javascript trick.
Something I did notice though during testing - it still does not translate the language from English to Spanish so unsure if the script is complete/or still needs additionally tinkering from my side (i.e. do I need to add any specific script tags to any of the content?)
It was acting strange for me in CodePen. I don’t know what the problem was. I worked fine running it in VSCode. I can put it up on my website and see how it works there. I will check it tomorrow.
Your welcome. Give me a couple of days and will show you how to change the text like I did for the first three tabs. It doesn’t use Javascript. It is difficult to do with tabs.