Home Entrance Everyone Wiki Search Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
April 28, 2024 - @568.70 (what is this?)
Forum activity rating: Four Star Posts: 68/1k.beats Unread Topics | Unread Replies | Own Posts | Own Topics | Random Topic | Recent Posts
News: :happy: Open the all windows! Your mind needs storms and air! :happy:

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


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


Rule 1: Throw the bone!


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!

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

View Profile WWW

Always My PalFirst 1000 Members!spring 2023!Squirtle!!!!MIDI WarriorMIDI Warrior1234 Posts!OzspeckCool Dude AwardRising Star of the Web AwardMessage BuddyPocket Icelogist!OG! Joined 2021!The Smallest Ozwomp Known To ManBug!
« 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!!!

StatusCafe: wygolvillage
iMood: wygolvillage

View Profile WWW

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)

Languages

Started by Cobra!Board ✑ ∙ Writers Corner

Replies: 33
Views: 3312
Last post September 19, 2023 @813.10
by Guest
Do you guys use JS or any sort of scripting language to build your site?

Started by angel-valBoard ✁ ∙ Web Crafting

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

Started by LIABoard ✁ ∙ Web Crafting

Replies: 17
Views: 1304
Last post October 11, 2023 @152.56
by lars

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


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