Entrance Chat Gallery Search Everyone Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
July 06, 2025 - @970.38 (what is this?)
Activity rating: Three Stars Posts & Arts: 38/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts Start New Topic  Submit Art
News: :happy:  :pc: There are community newsletters here! :pc: :happy: Super News: In the EU? Sign the Stop Killing Games Petition!

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


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


Rule 1: Throw the bone!

⛺︎ My Room

View Profile WWW

Great Posts PacmanFirst 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
RSS: RSS

View Profile WWWArt

a silly heart 4 melon :)Ozwomp wants to know your locationHyperactive DonutGreat Posts PacmanOfficially DogThanks for being rad!
« 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 »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | ~ Send Feedback ~ 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