How to Localize a Simple HTML Website Page in My Case

What is the proper way to localize a static website

UPDATE:

As of March 2012, 99translations has been discontinued. Another similar service I've found is www.getlocalization.com/

ORIGINAL MESSAGE:

You could use something like 99translations.com. Open a project there and ask your community to help with translation. For example this is how the guys at smartgwt did it

Simplest way to create multiple-language one-page website

I'm not sure if this is efficient but since you have very little text, This will work.

// Maintain a supported Language List
var langList = ['en', 'zh'];
// Get browser Language
var userLang = navigator.language || navigator.userLanguage;
// extract Language (en-US => en)
userLang = userLang.substring(0, 2);
// Call the function to set language
changeLang(userLang);

// function to change language
function changeLang(lang) {
langList.forEach((langEle) => {
// if language matches, display
if (langEle == lang) {
var langElems = document.querySelectorAll('.' + langEle)
langElems.forEach((elem) => {
elem.style.display = "block"
})
}
// hide the language text
else {
hideLang(langEle)
}
})
}

// function to hide language
function hideLang(lang) {
var langElems = document.querySelectorAll('.' + lang)
langElems.forEach((elem) => {
elem.style.display = "none"
})
}
<h1><span lang="en" class="en">Hello</span> <span lang="zh" class="zh">你好</span></h1>
<button onclick="changeLang('en')">English</button><button onclick="changeLang('zh')">Chinese</button>

PHP Simple HTML DOM Parser Returns Nothing On a Specific Website

You'll never get any price content from this web-page since it is loaded with JavaScript. If you want to achieve this, you'll need to use another scraping tool.
Your first reflex when you use SimpleHTMLDom is to echo the HTML you parse to see what the library is able to read ! Even the word تومان isn't read in this case !

echo $html = file_get_html('https://meghdadit.com/product/75293/');

How to see an HTML page on Github as a normal rendered HTML page to see preview in browser, without downloading?

The most comfortable way to preview HTML files on GitHub is to go to https://htmlpreview.github.io/ or just prepend it to the original URL, i.e.: https://htmlpreview.github.io/?https://github.com/bartaz/impress.js/blob/master/index.html

How would I show an HTML page in Eclipse at Design Time?

  1. menu: window / show view / other ...
  2. enter browser in the search box on top
  3. select internal web browser

i would recommend you to install the web development tools

  1. menu: help / install new software
  2. select the software site for your eclipse installation (in my case it's "Helios - http://download.eclipse.org/releases/helios")
  3. enter "web" in the search bar (and wait a little bit) and select "Eclipse Web Developer Toos" and "Web Page Edtior (Optional)"


Related Topics



Leave a reply



Submit