![html css language switcher html css language switcher](https://classroomessentials.scholastic.ca/dw/image/v2/AAXY_PRD/on/demandware.static/-/Sites-master-catalog-cec-ca/default/dwf3a64f8b/products/9781338687125.jpg)
#second-language Step 3: Create the second language pagesįrom here on I’ll use English as the main language and Chinese as the alternate language. You would then add the declaration to your stylesheet (the font name is only an example):
Html css language switcher code#
In this case you can simply view the source code and copy the font name. Often my clients won’t know the font name, but in many cases they can point to a website that uses a font they like. There are a lot of different fonts for Chinese text but, as I cannot read Chinese, I always get my client to specify the font they want to see and I then specify this in the stylesheet. If your second language is one that uses the Roman alphabet you can skip this step because the font will be the same as used for your primary language.īut if it’s a language that uses different characters, like Chinese, you can set up a div in your stylesheet that defines the font you want to use. For example, in the case of Chinese the folder name becomes ‘zh’ Step 2: Set the font for your second language pages It’s a good idea to use the International 2 letter code for the second language as the name for this folder because that will help the search engines. Here are the detailed steps: Step 1: Create a new folder for your second language pages.Ĭreate a new folder on your server that will hold the translated versions of each page on your site. Create a language switcher that you add to each page of both languages.
Html css language switcher update#
Update the menu links on your second language pages to link to translated pages in the new folder.Add the translated pages to this folder.Create a new directory, or folder, on your server to hold your second language pages.Living as an ex-pat in Hong Kong I’m often asked to create websites in dual languages (Chinese and English).Ĭreating dual language functionality if you’re building a static HTML website is very straightforward, and that is what is covered in this article.
![html css language switcher html css language switcher](https://apkses.com/wp-content/uploads/2020/12/Web-Development-PRO-HTML-CSS.jpg)
If you’re not using a Content Management System, then read on! I’ve described how I translate WordPress websites with the plugin that I use.
![html css language switcher html css language switcher](https://www.sourcecodester.com/sites/default/files/images/jakerpomperada/guesser.jpg)
If you’re using WordPress, there are a number of plugins that handle dual language translations.