Language setting in Foundation Site Styles


(Dick Sijtsma) #1

Hi there,

trying to find an answer on this question:

I thought that the language selector in the Foundation Site Style stack would set the language attribute of the starting html tag. However, this is not the case. I chose Dutch, and was expecting a opening tag like <html lang="nl"> or something similar to that. It was not the case. Changing the selector in the stack to another language (english) didn’t work either. Is this selector setting meant to create the language attribute of the opening html tag? Or do i achieve that in a different way?
Thanks!


(Adam Shiver) #2

Not to derail the original poster’s thread, but… I think setting the document’s language setting would be an interesting feature for RW to have built-in. Would this be a possibility @dan, @simon?


(Dick Sijtsma) #3

I think so too, @Elixir
Still, i’m wondering what this setting in Foundation styles is supposed to do…


(Dan) #4

Anything is possible :wink:

However, we’ve not had much call for this feature… if a lot of users want it we’ll see what we can do until, but then it’s pretty far down on the list — there’s so much other stuff we need to add that is more pressing :smiley:

Cheers,
Dan


(Joe Workman) #5

The language is set via JS APIs at page load in order to inform the browser what language the website is using. If you inspect the page in the browser, you will see that the proper language that you defined is set. :slight_smile:


(Jochen Abitz) #6

@joeworkman Are you sure? On my sites (german) no “lang=…” is defined in the code.


(Dick Sijtsma) #7

@joeworkman : You are saying > If you inspect the page in the browser…

What do you mean? View page source?
This is what i see : <!doctype html><html class="no-js"><head>....

Why a javascript solution? Not all users allow javascript. I thought it must be relatively easy to put the language value right into the html tag.


(Joe Workman) #8

You cannot do View Source that shows that HTML file as if you were to open it inside a text editor. You need to Inspect Element on the page. This will display the site after all of the code has been interpreted.

I use JS because there is no direct way for us to modify this with the RapidWeaver APIs. I could use PHP; then it would show in View Source. However, then every Foundation page would need to be php. I did not want that, especially since JS does the job.


(Joe Workman) #9

If you have javascript disabled then you have a pretty damn poor web experience nowadays. So many other things won’t work or won’t be displayed that the least of your problems is the language setting. Its not the 90’s anymore. The entire web relies very heavily on JS.


(Jochen Abitz) #10

Ah, thanks Joe! Got it.


(Dick Sijtsma) #11

All clear. Thanks. The dutch language is set in my page.


(Dick Sijtsma) #12

I know it does. And i am using javascript.
But how about a screen reader? Or how about the refreshable braille display? How about text browsers on linux / unix machines? Different people have different needs. Some people are blind, some are very aware about their security, some don’t have the money for modern machines. We could try to help all of those.
Don’t let the way sites are made interfere with their specific needs. It’s all about inclusion…


(Joe Workman) #13

The text on your website is still the same correct? Its not going to magically change to anything different. Therefore all of these accessibility tools will still display the text on your site properly. If you have anything that shows any different, please let me know.