• Jump to Main Content [m]
  • Jump to Footer [f]
  • List of all Access Keys [k]

mYm

  • Artists
  • Small Business
  • Non-Profit
  • Independent
  • Video
  • About
  • Contact
  • Lynn Chandhok
  • Lisa Pines
  • Elizabeth Watt
  • Doug Bost
  • Patterson Graham
  • Sean Justice
  • Adrian Hibbs
  • WineFlirt
  • Brooklyn-Real
  • myPOS
  • Cartema
  • AtlanticTV
  • Weidenbaum
  • Rediscovering Dorothy
  • Chelsea Dayschool
  • East River Institute
  • Dyslexia Association
  • Alison Gootee
  • Berit Anderson
  • Jenna Zabala
  • MonaInk
  • Tesla Protection
  • NYCTV
  • GuerillaFX
  • MoyerCine
  • Anthony Gasparro
  • Cayman NetNews
  • 0260
  • Adam Edits
  • DirecTouch
  • CareerJournal
  • Ford Motor Company
  • StudioOne Networks
  • Business Machines
  • Design FlipBook!
  • More Projects
  • En Español
  • Testimonials
  • Amigos
  • Green
  • Give
  • Map
  • Directions
  • Tell A Friend
  • More Projects
  • Design FlipBook!

Making new language pages

This tutorial is only relevant to sites we make that are translated into multiple languages, it does not tell you how to setup new languages for your existing site, if you need that done, please contact mYm

Before you read these instructions you should have gone through these tutorials:

  • Getting your FTP Client and HTML Editor
  • Transferring files with FTP
  • Editing HTML

We use PHP to simplify some things that happen on the site and make other things possible that you would not be able to do with just HTML. Let's go back to the very top of the document where we'll see this:

<?php
$navID="Company";
$pageURL="www.atlantictv.com/company/";
$pageTitle="Company";
$companyName="Atlantic Television";
$langID="";
$fileID="index";
?>

The stuff after the dollar signs are the variables. These are set on the top of the page and used throughout the page. All of this stuff is case sensitive, so if the word Company starts with a capital C, you would need it to be that way for it to work. When you duplicate pages to make the new language pages half of the information will not need to be changed, the $navID would still be Company for instance. The $pageURL will change for every page, since we have four languages, each directory (like company for instance) will have four files in it for each page on the site. Every directory by default has the index.php page, so to make the different languages you can take that page and duplicate it three times so you have four of them, then name them:

index.php
index.de.php
index.fr.php
index.es.php

Let's open the index.de.php page and go to the php on the top. The $pageURL would be "www.atlantic.tv.com/company/index.de.php", the $pageTitle could change to the word company in German, and the $langID would change to "de". The $langID is just the extension that gets appended, so if we're on the english page it's blank like $langID="" but if you are on a language page you'd need to add the extension like $langID=".de"

Also on the very top of the page is this line:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

The EN stands for English, but this is just the language the DTD was written in, not the language of the document. You should not change this to another two letter abbreviation.

Directly below the PHP stuff you'll find this line:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

You need to change the lang="" to the appropriate two letter abbreviation here for each page: ES for Spanish, DE for German, FR for French...

The $fileID is the name of the file before any language extension, which in most cases is index

Keep in mind that file names on the site are all lowercase.

Below that don't forget to change your meta description tag

« back

Bookmark This Page

news jobs resources sitemap en español stock photos client area help!
RSS Files

© 2008

mimoYmima.com
mimo brent@mimoymima.com
+1 (646) 496-3279
mima teresa@mimoymima.com
+1 (917) 821-4489
1109 Prospect Ave #3A
Brooklyn , NY , 11218