Home Events! Entrance Everyone Wiki Search Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
November 21, 2024 - @710.00 (what is this?)
Forum activity rating: Three Stars Posts: 35/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts    Start New Topic
News: :eyes: ~ Inconvenience is counterculture ~ :eyes:

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  HELP: Language Switching?


« previous next »
Pages: [1] Print
Author Topic: HELP: Language Switching?  (Read 769 times)
night-at-the-musian
Jr. Member ⚓︎
**


Rule 1: Throw the bone!

⛺︎ My Room

View Profile WWW

First 1000 Members!Joined 2023!
« on: December 19, 2023 @237.35 »

I'm working with some native Spanish speakers to translate my site into LatAm Spanish. Currently, I have a separate page where I keep all the translations; but I would like the option for a viewer to select the translation as part of a dropdown menu, a la Neopets, and their selection would carry across all pages. I've been trying to search for bits and pieces, but I haven't found a proper tutorial or method for getting it all together.

So! Any tips, tutorials, or suggestions on how to do this? Or will I need to make new pages with something in the URL, for example "site/esp/page.html"? All help is appreciated!! :4u:
Logged

Tiny Roman Appreciator

Melooon
Hero Member ⚓︎
*****


So many stars!

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games

View Profile WWW

Thanks for being rad!a puppy for your travelsAlways My PalFirst 1000 Members!spring 2023!Squirtle!!!!MIDI WarriorMIDI Warrior1234 Posts!OzspeckCool Dude AwardRising Star of the Web AwardMessage BuddyPocket Icelogist!OG! Joined 2021!...
« Reply #1 on: December 19, 2023 @821.99 »

Static HTML sites don't make this easy  :ohdear:  You could have a Javascript that selects blocks of text and changes the text based on someone's language selection, but you'd have to custom code every piece of text or build quite a complex system of naming blocks of text and matching each block to a translation entry.. that's not impossible but is kinda a big job (I don't recommend this)

Neopets works using PHP, which means the pages are programaticly generated based on your preferences, that's a totally different technology (and it would still require quite a bit of work to setup; worth it for a complex site but not a small one).

If the translation is a primary focus for ur site then the best solution is just to have separate HTML pages for each language version of a page, make sure they all use a standard structure and use shared CSS to theme them all ^^ That not much fun to do, but its the best static solution. You can speed it up a lot if you use a static site generator like 11ty; 11ty takes a bit of learning, but I would say it's worth it if you have many pages and it's a good way to handle this.
Logged


everything lost will be recovered, when you drift into the arms of the undiscovered
wygolvillage
Sr. Member ⚓︎
****


meow!!!

⛺︎ My Room
StatusCafe: wygolvillage
iMood: wygolvillage

View Profile WWW

Thanks for being rad!melonlands goth cat!First 1000 Members!Joined 2023!
« Reply #2 on: December 19, 2023 @857.79 »

One section of my site switches what text displays in certain places via a style switcher (code I used is linked here) but to do that it would mean putting ALL of the text content of your site into your stylesheets and determining it via span class or span id, which honestly seems even harder than just making separate pages....
Logged


Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

Do you guys use JS or any sort of scripting language to build your site?

Started by angel-valBoard ✁ ∙ Web Crafting

Replies: 39
Views: 2795
Last post June 22, 2023 @911.82
by Memory
What helped you code html/css easy?

Started by LIABoard ✁ ∙ Web Crafting

Replies: 17
Views: 2150
Last post October 11, 2023 @152.56
by flowers
Using your website to help reinforce learning a new language? (Or other skill!)

Started by Snackish MagpieBoard ✁ ∙ Web Crafting

Replies: 4
Views: 698
Last post August 05, 2023 @568.00
by Kallistero

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi