Thursday, September 27, 2007

Translating_WordPress Procedure



 
  
 
Table of contents [ showhide]
 

Internationalization and localization are terms used to describe the effort to make WordPress (and other such projects) available in languages other than English, for people from different locales, who use different dialects and local preferences.

The process of localizing a program has two steps. The first step is when the program's developers provide a mechanism and method for the eventual translation of the program and its interface to suit local preferences and languages for users worldwide. WordPress developers have done this, so in theory, WordPress can be used in any language.

The second step is the actual localization, the process by which the text on the page and other settings are translated and adapted to another language and culture, using the framework prescribed by the developers of the software. WordPress has already been localized into many other languages (see WordPress in Your Language for more information).

This article explains how translators (bi- or multi-lingual WordPress users) can go about localizing WordPress to more languages.

Translating WordPress

Before you start translating WordPress, check WordPress in Your Language (and resources cited there) to see if a translation of WordPress into your language already exists. It is also possible that someone (or a team) is already working on translating WordPress into your language, but they haven't finished yet. To find out, subscribe to the wp-polyglots mailing list , introduce yourself, and ask if there's anyone translating into your language. There is also a list of localization teams and localization teams currently forming, which you can check to see if a translation is in progress.

Qualifications

Assuming that a WordPress translation into your language does not already exist or have someone working on it, you may want to volunteer to create a public translation of WordPress into your language. If so, here are the qualifications you will need:

  • You need to be truly bilingual -- fluent in both written English and the language(s) you will be translating into. Casual knowledge of either one will make translating difficult for you, or make the localization you create confusing to native speakers.
  • You need to be familiar with PHP, as you will sometimes need to read through the WordPress code to figure out the best way to translate messages.
  • You should be familiar with human language constructs: nouns, verbs, articles, etc., different types of each, and be able to identify variations of their contexts in English.

About Locales

A locale is a combination of language and regional dialect. Usually locales correspond to countries, as is the case with Portuguese (Portugal) and Portuguese (Brazil).

You can do a translation for any locale you wish, even other English locales such as Canadian English or Australian English, to adjust for regional spelling and idioms.

The default locale of WordPress is U.S. English.

Localization Technology

WordPress's developers chose to use the GNU gettext  (http://www.gnu.org/software/gettext/gettext.html ) localization framework to provide localization infrastructure to WordPress. gettext is a mature, widely used framework for modular translation of software, and is the de facto standard for localization in the open source/free software realm.

gettext uses message-level translation — that is, every "message" displayed to users is translated individually, whether it be a paragraph or a single word. In WordPress, such "messages" are generated, translated, and used by the WordPress PHP files via two PHP functions. __() is used when the message is passed as an argument to another function; _e() is used to write the message directly to the page. More detail on these two functions:

__($message) 
Searches the localization module for the translation of $message, and passes the translation to the PHP return statement. If no translation is found for $message, it just returns $message .
_e($message) 
Searches the localization module for the translation of $message, and passes the translation to the PHP echo statement. If no translation is found for $message, it just echoes $message .

Note that if you are internationalizing a Theme or Plugin, you should use a "Text Domain". See Writing a Plugin for more information on how to do this for a plugin; themes are similar.

The gettext framework takes care of most of WordPress. However, there are a few places in the WordPress distribution where gettext cannot be used -- see Files For Direct Translation for more information on how to translate these spots.

gettext files

There are three types of files used in the gettext translation framework. These files are used and/or generated by translation tools during the translation process, as follows:

POT (Portable Object Template) files 
The first step in the localization process is that a program is used to search through the WordPress source code and pick out every message passed into a __() or _e() function. This list of English-language messages is put into a specially-formatted template file (POT file) that forms the basis of all translations. Generally, you can download a POT file for WordPress, so you shouldn't have to generate your own. Separate POT files can also be made for themes and plugins, if the theme/plugin developer has enclosed all text in __() or _e() functions.
PO (Portable Object) files 
The second step in the localization process is that the translator translates all the messages from the POT file into the target language, and saves both English and translated messages in a PO file.
MO (Machine Object) files 
The final step in the localization process is that the PO file is run through a program that turns it into an optimized machine-readable binary file (MO file). Compiling the translations to machine code makes the localized program much faster in retrieving the translations while it is running.

Translation Tools

There are various tools available to aid in translating. You may use whichever you prefer.

Launchpad  ( https://translations.launchpad.net/) 
The Ubuntu Linux project has a web site that allows you to translate messages without even looking at a PO or POT file, and export directly to a MO.
Note: many translators have found Rosetta to be a good starting point, but once it comes time to proofread the entire list of translations, many have opted to switch hand-editing the PO file or using a program like poEdit or KBabel, since the Rosetta UI lacks a search feature and other things that become essential when proofreading and editing.
poEdit ( http://www.poedit.net/ ) 
An open source program for Windows, Mac OS X and UNIX/Linux which provides an easy-to-use GUI for editing PO files and generate MO files.
KBabel  ( http://i18n.kde.org/tools/kbabel/) 
Another open source PO editing program for the KDE window manager on Linux.
GNU Gettext  ( http://www.gnu.org/software/gettext/) 
The official Gettext tools package contains command-line tools for creating POTs, manipulating POs, and generating MOs. For those comfortable with a command shell.

Translating With Launchpad

  1. Go to Launchpad's WordPress translation page  (https://launchpad.net/wordpress/2.1/+pots/wordpress ).
  2. If you're not already logged in to Launchpad, choose "Log In / Register" at the top right. Log in, or create a Launchpad account if you don't have one already.
  3. Choose a language to begin translating.

When you are finished with your translation, you can export it as a PO or MO file if you like, by visiting the PO File Details page for your language and clicking on Export as PO file or Export as MO file .

Translating With poEdit

  1. Download and install poEdit  ( http://www.poedit.net/)
  2. Download the official WordPress POT file  ( http://svn.automattic.com/wordpress-i18n/pot/trunk/wordpress.pot)
    The poEdit screen
    The poEdit screen
  3. Open the file in poEdit.
  4. (See Image) The box labeled (1) is the original message (in English) from the POT file. The box labeled (2) is where you add your translation. Boxes labeled (3) and (4) are used for adding comments about the messages. These come in handy if you are working with a team of translators and would like to pass around ideas through the PO file.
  5. Go to File → Save as… to save your translations in a PO file.
  6. When you are finished translating, go to File → Save as… again to generate the MO file.
  7. Or you can set your poEdit to always compile a MO file when saving changes by clicking File → Preferences and on the Editor tab check the Automatically compile .mo file on save box.

Translating With KBabel

This section is incomplete.

  1. Download the official WordPress POT file  ( http://svn.automattic.com/wordpress-i18n/pot/trunk/wordpress.pot)
  2. Open the file in KBabel

Translating With Gettext Tools

  1. Download the official WordPress POT file  ( http://svn.automattic.com/wordpress-i18n/pot/trunk/wordpress.pot)
  2. Open the file in your favorite text editor
  3. Update the header information
  4. Translate the messages
  5. Save the file with a .po file extension
  6. Issue msgfmt -o filename.mo filename.po

The PO File Header

At the beginning of the PO file is something called the header. This gives information about what package and version the translation is for, who the translator was, and when it was created. Certain portions of this header should be universal for all WordPress translations:

# LANGUAGE (LOCALE) translation for WordPress. # Copyright (C) YEAR WordPress contributors. # This file is distributed under the same license as the WordPress package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: WordPress VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2005-02-27 17:11-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" 

Fill in the rest of the capitalized text with the appropriate values.

Message Format

The remainder of the file will be in a format as follows:

#: wp-comments-post.php:13 msgid "Sorry, comments are closed for this item." msgstr ""  #: wp-comments-post.php:29 msgid "Sorry, you must be logged in to post a comment." msgstr ""  #: wp-comments-post.php:35 msgid "Error: please fill the required fields (name, email)." msgstr "" 

The first line of each message contains the location of the message in the WordPress code. In the case of these messages, they're all located in wp-comments-post.php, on lines 13, 29, and 35, respectively. Occasionally you will come across a message for which you will need to check its context; look at the appropriate line or lines in the WordPress core, and you should be able to figure out when and where the message is displayed, and even reproduce it yourself using your web browser. Some messages will also appear with the same text in multiple locations; in that case, there may be more than one line giving a file and line location.

The next line, msgid, is the source message. This is the string that WordPress passes to its __() or _e() functions, and the message you will need to translate.

The final line, msgstr, is a blank string where you will fill in your translation.

Here's how the same few lines would look after being translated, using the French (France) (http://svn.automattic.com/wordpress-i18n/fr_FR/trunk/messages/fr_FR.po ) locale as an example:

#: wp-comments-post.php:13 msgid "Sorry, comments are closed for this item." msgstr "L'ajout de commentaire n'est pas ou plus possible pour cet article."  #: wp-comments-post.php:29 msgid "Sorry, you must be logged in to post a comment." msgstr "Vous devez être connecté pour rédiger un commentaire."  #: wp-comments-post.php:35 msgid "Error: please fill the required fields (name, email)." msgstr "Erreur : veuillez remplir les champs obligatoires vides (nom, e-mail)." 
Note: see Character encodings and HTML character entities below for notes on when to use HTML character entities in translation.

Types of messages

Labels

Labels are often used in the context of HTML <label>, <legend>, <a>, or <select> tags. They are short and precise descriptors of the purpose of a UI element. These can be very difficult to translate at times, especially if they are single words, and if the word used in English can be interpreted as either a noun or imperative verb. With most labels you will need to do some searching through the code to find the context of its use before coming up with an appropriate translation.

Because so many of the messages are part of the WordPress administration interface, Labels are probably the most frequent type of message to translate.

Examples

msgid "Post" msgstr "Artikkeli" 

"Post" could be interpreted as an imperative verb, but in this context it's a noun. The noun form of "post" in English can be difficult to translate, and the most appropriate translation has been difficult for some teams to decide upon. Many translations use their language's equivalent to the English "Article," as this one does. (From the Finnish (Finland)  (http://svn.automattic.com/wordpress-i18n/fi_FI/trunk/messages/fi_FI.po ) translation.)

#: wp-login.php:79 wp-login.php:233 wp-register.php:166 #: wp-includes/template-functions-general.php:46 msgid "Register" msgstr "रजिस्टर" 

From the Hindi translation.

#: wp-admin/admin-functions.php:357 msgid "- Select -" msgstr " - Dewis -" 

Items like the surrounding dashes in this example can be eliminated or replaced if they might be confusing to users in your target locale, or if there are different established conventions for your locale. From the Welsh translation.

Informational Messages

Another frequent type of message, the informational message is usually composed of full sentences, and conveys information or requests an action of the user. Since these tend to be longer than labels, they tend to be slightly easier to translate. However, with the longer messages comes more variation in the level of formality (or informality), which is something translators need to be aware of.

Examples

#: wp-login.php:146 msgid "Your new password is in the mail." msgstr "Вашата нова парола е в електронната ви поща." 

This particular message contains a modified English formulaic expression ("the check/cheque is in the mail"), which contributes to its informality. (From the Bulgarian (Bulgaria) (http://svn.automattic.com/wordpress-i18n/bg_BG/trunk/messages/bg_BG.po ) translation.)

#: wp-includes/functions.php:1636 msgid "<strong>Error</strong>: Incorrect password." msgstr "<strong>FEL</strong>: Felaktigt lösenord." 

Error messages tend to be more formal, simply because they're short and concise. (From the Swedish (Sweden) (http://svn.automattic.com/wordpress-i18n/sv_SE/trunk/messages/sv_SE.po ) translation.)

#: wp-includes/functions-post.php:467 msgid "Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy." msgstr "Leider kannst du nur alle 15 Sekunden einen neuen Kommentar eingeben. Immer locker bleiben." 

Of course, not all of them. (From the German (Germany) (http://svn.automattic.com/wordpress-i18n/de_DE/trunk/messages/de_DE.po ) translation.)

Date and Time Locale Settings

Rather than using PHP's built-in locale switching features, which is not configured for very many languages on most hosts, WordPress uses the gettext translation module to accomplish date and time translations and formatting.

WordPress translates the following:

Month names

#: wp-includes/locale.php:42 wp-includes/locale.php:57 msgid "May" msgstr "Květen" 

(From the Czech (Czech Republic) (http://svn.automattic.com/wordpress-i18n/cs_CZ/trunk/messages/cs_CZ.po ) translation.)

Month abbreviations

#: wp-includes/locale.php:57 msgid "May_May_abbreviation" msgstr "Mag" 

Note the unusual msgid. These messages should NOT be translated literally: they are a hack to get around the fact that in English, the full name and abbreviation for May are the same, which Gettext would erroneously combine into one entry. (From the Italian (Italy)  (http://svn.automattic.com/wordpress-i18n/it_IT/trunk/messages/it_IT.po ) translation.)

Weekday Names

#: wp-includes/locale.php:7 #: wp-includes/locale.php:18 #: wp-includes/locale.php:31 msgid "Tuesday" msgstr "火曜日" 

(From the Japanese (Japan) (http://svn.automattic.com/wordpress-i18n/ja_JP/trunk/messages/ja_JP.po ) translation.)

Weekday Abbreviations

#: wp-includes/locale.php:31 msgid "Tue" msgstr "Уто" 

(From the Serbian (Serbia & Montenegro) (Cyrillic) ( http://svn.automattic.com/wordpress-i18n/sr_CS/trunk/messages/sr_CS.po ) translation.)

Weekday Initials

#: wp-includes/locale.php:18 msgid "T_Tuesday_initial" msgstr "ti" 

The weekday initials are for WordPress's calendar feature, and use the same hack as the month abbreviations to get around the fact that in English Tuesday and Thursday share the same first letter. Not all locales use single-letter abbreviations for all days: in this example, Norwegian Bokmål uses an extra letter to distinguish tirsdag (Tuesday) and torsdag (Thursday). (From the Norwegian Bokmål (Norway) ( http://svn.automattic.com/wordpress-i18n/nb_NO/trunk/messages/nb_NO.po ) translation.)

Date Formatting Strings

These are PHP date() ( http://php.net/date ) formatting strings, and they allow you to change the formatting of the date and time for your locale.

WordPress uses the translations elsewhere in the localization file for month names, weekday names, etc. This special string is for the selection of which elements to include in the date & time, as well as the order in which they're presented.

Take this msgid from the theme.pot file:

#: archive.php:40 search.php:19 single.php:22 msgid "l, F jS, Y" msgstr "" 

In English, this gets formatted as:

Sunday, February 27th, 2005 

However, different locales format their dates differently. In Danish, for example, dates are written:

søndag, 27. februar 2005 

To accomplish this, the msgid above would be translated to:

#: archive.php:40 search.php:19 single.php:22 msgid "l, F jS, Y" msgstr "l, j. F Y" 

To use another example, one way to format dates in Chinese and Japanese is as follows:

2005年2月27日 

This would be accomplished in the translation like this:

#: archive.php:40 search.php:19 single.php:22 msgid "l, F jS, Y" msgstr "Y年n月j日" 

Lastly, if you need to include literal alphabetic characters in your date format, as sometimes occurs in Spanish, you can backslash them:

#: archive.php:40 search.php:19 single.php:22 msgid "l, F jS, Y" msgstr "l j \d\e F \d\e Y " 

This would output:

domingo 27 de febrero de 2005 

Translation via WordPress-PHP

To translate your Date e.g. inside your plugin use the wp-function mysql2date(Dateformat, Datestring) ( http://code.wordpress.de/xref/nav.htm?wp-includes/functions.php.htm#mysql2date ). It uses the month- and week-translations to return your date.

Messages With Placeholders

Many messages contain special PHP formatting placeholders, which allow the insertion of untranslatable dynamic content into the message after it is translated. The PHP placeholders come in two different formats:

%s 
When only one placeholder is present, this marker is used.
%1$s, %2$s, %3$s, … 
Numbered placeholders, which allow translations to rearrange the order of the placeholders in the string while maintaining the information each is replaced with.

Examples

#: wp-login.php:116 msgid "The e-mail was sent successfully to %s's e-mail address." msgstr "El e-mail fue enviado satisfactoriamente a la dirección e-mail de %s" 

This message inserts the username of the user to which an email has been sent. (From the Spanish (Spain) (http://svn.automattic.com/wordpress-i18n/es_ES/trunk/messages/es_ES.po ) translation.)

#: wp-admin/upload.php:96 #, php-format msgid "File %1$s of type %2$s is not allowed." msgstr "类型为%2$s的文件%1$s不允许被上传。" 

This message reverses the order in which the file name and type are used in the translation. (From the Chinese (China) (http://svn.automattic.com/wordpress-i18n/zh_CN/trunk/messages/zh_CN.po ) translation.)

Tips for Good Translations

Don't translate literally, translate organically 
Being bi- or multi-lingual, you undoubtedly know that the languages you speak have different structures, rhythms, tones, and inflections. Translated messages don't need to be structured the same way as the English ones: take the ideas that are presented and come up with a message that expresses the same thing in a natural way for the target language. It's the difference between creating an equal message and an equivalent message: don't replicate, replace. Even with more structural items in messages, you have creative license to adapt and change if you feel it will be more logical for, or better adapted to, your target audience.
Try to keep the same level of formality (or informality) 
Each message has a different level of formality or informality. Exactly what level of formality or informality to use for each message in your target language is something you'll have to figure out on your own (or with your team), but WordPress messages ( informational messages in particular) tend to have a politely informal tone in English. Try to accomplish the equivalent in the target language, within your cultural context.
Don't use slang or audience-specific terms 
Some amount of terminology is to be expected in a blog, but refrain from using colloquialisms that only the "in" crowd will get. If the uninitiated blogger were to install WordPress in your language, would they know what the term means? Words like pingback, trackback, and feed are exceptions to this rule; they're terminology that are typically difficult to translate, and many translators choose to leave in English.
Read other software's localizations in your language 
If you get stuck or need direction, try reading through the translations of other popular software tools to get a feel for what terms are commonly used, how formality is addressed, etc. Of course, WordPress has its own tone and feel, so keep that in mind when you're reading other localizations, but feel free to dig up UI terms and the like to maintain consistency with other software in your language.

WordPress Localization Repository

The WordPress Localization Repository at http://svn.automattic.com/wordpress-i18n/ is a Subversion repository where official WordPress translations are maintained. Various teams collaborate on translations for their native language, and team maintainers commit updates and changes to the repository.

Participating

Participation in the repository is open to anyone. Simply subscribe to the wp-polyglots mailing list , introduce yourself, and let everyone know what translation you'd like to work on. If there is already a team for your language and locale, they'll let you know and you can join them. If not, you can either volunteer to be a maintainer for your language and locale, or simply contribute your localization and the repository maintainers will add it.

Guidelines and requirements

Note: these guidelines are subject to change as the system evolves; repository maintainers will be happy to assist you in updating the files you maintain in the repository should these guidelines change.

Character Encodings

All localizations should have at least a UTF-8 version, but may optionally add versions in other character encodings popular for that locale.

PHP does not support Byte Order Markers (BOMs), so be sure the UTF-8 encoded files you contribute do not have them.

HTML Character Entities

With a few exceptions (noted below), all translations should be written literally, rather than escaping accented and special characters with HTML character entities.

Some characters must be escaped to avoid conflict with XHTML markup: angle brackets (&lt; and &gt;), and ampersands (&amp;). In addition, there are a few other characters better used escaped, such as non-breaking spaces ( &nbsp;), angle quotes (&laquo; and &raquo;), curly apostrophes (&#8217;) and curly quotes.

For more information about the W3C's best practices involving character encodings and character entities, see the following references:

Repository File Structure

The repository contains directories for each locale, which are named as follows:

Within each locale's directory are the regular Subversion versioning directories: branches/, tags/, and trunk/.

Inside the appropriate versioning directory are the following subdirectories:

dist/

This directory contains all files in the WordPress distribution that cannot be Gettexted, which have been translated into the target locale.

If the locale has only a UTF-8 translation of the files, the dist/ directory may be populated with them directly, and the structure within dist should mirror the structure of the wordpress root directory:

  • dist/
    • license.html
    • readme.html
    • wp-config-sample.php
    • …
    • wp-admin/
      • install.php
      • upgrade.php
      • …

If the locale contains more than just a UTF-8 character encoding, then dist/ should contain subdirectories for each encoding:

  • dist/
    • UTF-8/
      • license.html
      • readme.html
      • wp-config-sample.php
      • …
      • wp-admin/
        • install.php
        • upgrade.php
        • …
    • ISO-8859-1/
      • …
    • …

messages/

This directory contains the Gettext MO and PO files for the locale. Message files are named as follows:

Examples:

cs_CZ.po        # UTF-8 character encoding ja_JP.EUC-JP.mo # EUC-JP character  

theme/

Similarly to the dist/ dir, theme/ contains hard-translated theme files. If only a UTF-8 translation is present, the directory can be populated with subdirectories for each theme translated. These subdirectories contain all of the same files as the original theme (except that they're translated), and are named the same as the original theme:

  • theme/
    • default/
      • 404.php
      • index.php
      • sidebar.php
      • …
      • images/
        • …

Just as with the dist/ directory, if there are multiple character encodings represented, theme/ should contain a subdirectory for each character encoding, which in turn would contain subdirectories for each theme translated.

Troubleshooting

Rosetta won't export my translation as an MO file. It just says, "A system error occurred." 
There is a syntax error in your translation that is preventing it from compiling to an MO. Download the PO instead and try compiling it manually with msgfmt. This will tell you which lines the errors are on so you can correct them by hand. If you don't have the GNU Gettext package installed, you can try opening the PO file in poEdit or KBabel to see if they will help you correct the errors, or you can email the wp-polyglots mailing list and ask for someone to debug it for you.

Resourcess

Ryan Boren's Localizing Plugins and Themes  ( http://boren.nu/archives/2004/11/01/localizing-plugins-and-themes/)


Tuesday, September 25, 2007

phpsitemapng

 
 

Installation of Google Sitemap generator phpSitemapNG

 

  1. Download the current release and store it on your harddisc
  2. Create a directory on your webserver (suggestion: /admin/phpsitemapng) and protect it
  3. Extract this archive and copy the files to this directory on your website, copy sitemap.xml and sitemap.xml.gz into the root directory of your website.
  4. Make the following files writable (chmod 0666):
    • /sitemap.xml (- or /sitemap.xml.gz for compressed sitemap)
    • /sitemap.txt (if you would like to write txt sitemaps files)
    • settings/settings.inc.php (to store your settings)
    • settings/files.inc.php - (store information about generated sitemap; only useful for small websites)
  5. That's it, you can proceed with the usage of phpSitemapNG

Foreign languages / translations:

 Next step: usage of phpSitemapNG

 

 

Usage of phpSitemapNG

http://enarion.net/google/phpsitemapng/usage/

Usage of Google Sitemaps generator phpSitemapNG - in English

Make shure you have installed this script as written at the phpSitemapNG installation guide

Follow theses steps to generate your sitemap:

1. Setup phpSitemapNG
2. Run phpSitemapNG
3. Edit the result
4. Store sitemap
5. Inform Google
6. Watch your website within Google

1. Setup phpSitemapNG

execute the script with your browser: browse to http://www.yourhost.com/admin/phpSitemapNG/ (take care of the capital letters).
You'll get a screen like this:
Screenshot of phpSitemapNG - settings screen

Set the settings according to the folling cases
Common settings:
  • Check the settings in Page root (this is the path on the webserver where your files are stored) and the Website (the url of your website) and maybe correct them if necessary.
  • Exclude directories - this directories will not be scanned for urls;
    Example: to exlude all files in the directory img but not images, add /img/ to the list of directories; there is only a substring comparison performed
  • Exclude files - urls containing strings that are in this list, will neither be added to the sitemap nor crawled for urls
Please choose the item that matches your website and set the settings accordingly:

I am running a small website with less than 500 files

Make the following settings:

  • Check Ping google
  • Uncheck compress sitemap
  • Check Local file system scan and Scan website
  • Check Display edit screen after scan
  • Check Store filelist
  • Adapt Lastmod, Priority and Changefreq to your needs

With this settings, phpSitemapNG will scan your filesystem and crawl your website and finally give you an edit screen where you can adapt the values.

 

I am running a big website with more than 500 files

Make the following settings:

  • Check Ping google
  • Check compress sitemap
  • Check Local file system scan and maybe Scan website
  • Uncheck Display edit screen after scan
  • Uncheck Store filelist
  • Adapt Lastmod, Priority and Changefreq to your needs

With this settings, phpSitemapNG will scan your filesystem and maybe crawl your website and will write the result direct into the sitemap file.
There will be no edit screen since this can slow down or kill your browser. The created sitemap file will be compressed (if available). Check the expert settings to get some background information about the timeout functionality and the crawler if you're running into problems when saving the settings and executing the scan.

 

I am an expert and would like to know everything about phpSitemapNG

  • Ping google - inform Google when a sitemap has been created
  • Timeout functionality - phpSitemapNG allows you to set the time how long it will perform the actions. This is necessary if you're running a big website with many urls, but your webhoster allows you to execute php scripts only for a short amount of time.
    There are two different timeouts that might occur:
    1. PHP timeout: The PHP engine stops the exection and prints an error at the end of the script.
      Solution: Just press the Setup link, enable the timeout and type in the average time to the timeout (normally 30 seconds) minus 5 seconds (backup) time. :) Now the browser is forced to reload the page with javascript (if not enabled, please do it here!) when a timeout occurs.
    2. Webserver timeout: The webserver stops the output thread and does not print an error at the end of the script.
      Solution: Just press the Setup link, enable the timeout and type in the average time to the timeout (normally 300 seconds) minus 5 seconds (backup) time. :)

 

2. Run phpSitemapNG

Press the Submit Settings button to store the settings and start the scan of your website.

3. Edit the result

If you checked the "Display edit screen after scan" checkbox, you'll see a page like this:
Composition of Edit screen of phpSitemapNG
You can now adopt the settings to your needs. Press the "Create file" button to use this information for generation of the sitemap file.

4. Store sitemap

When you've pressed the button "Create file" in the result overview page the sitemap will be generated and written to the sitemap file specified at the settings page.

5. Inform Google

When the sitemap has been successfuly written to the filesystem you'll get the option to inform Google. Just press the "Submit to google" button.
Is this your first sitemap Google suggests to submit the sitemap within a Google Sitemaps account. You can get one at http://www.google.com/webmasters/sitemaps/. This is the only possibility to track the status of the Google sitemap at the moment - so please do so.
The message given by phpSitemapNG does only mean that Google got the url of the sitemap, not that it successfuly downloaded and computed the sitemap.

6. Watch your website within Google

That's it, you've successfuly created your Google sitemap.
So track the impact of Google Sitemaps you can query Google about the number of indexed pages: Type site:enarion.net (modify the website after site: to match your website). Then you'll see the number of indexed pages: Results 1-... of about x from ... Where x is the number of pages of your website that is integrated in the Google Search index at the moment. This number can differ depending on your location because of the not sychronized Google index.
Maybe you have some webpages in the result without description, only the url of the webpage. This means that Google got these urls (from the sitemap file) but does not have crawled, computed or added of this webpage to its index. It normally takes 1-5 days than there will be a description.

 Next steps: Donate phpSitemapNG, give feedback

 
 

--
Zhipeng Zhang (Alan)   BCompSc  MInfoTech MACS(Prov)

"You must be the change you wish to see in the world."

"Begin at the beginning and go on till you come to the end; then stop."
                                                                                       -- Lewis Carroll, Alice in Wonderland

Wednesday, September 05, 2007

Father of ASP.Net2.0

 
Microsoft Architect Journal
Architecture Journal Profile: Scott Guthrie
 

Scott Guthrie is a general manager in Microsoft's Developer Division. He runs the development teams that build CLR (Common Language Runtime), ASP.NET, WPF (Windows Presentation Foundation), "WPF/E," Windows Forms, IIS (Internet Information Services) 7.0, Commerce Server, .NET Compact Framework, and the Visual Studio Web and Client Development Tools. As part of the new Architecture Journal Profile series, Ron Jacobs sat down with Scott to ask him about his career and thoughts regarding architecture. (Click here to go to Scott Guthrie's Career at Microsoft.)

RJ: Today, we're going to talk about you and your career for people who think, "This sounds like a cool job." What's your role now at Microsoft?

SG: I run our .NET developer platform group. This group includes the CLR (Common Language Runtime), the .NET Compact Framework, IIS (Internet Information Services), ASP.NET, Atlas, Commerce Server, Windows Presentation Foundation, Windows Forms, and our development tools for targeting Web applications in Visual Studio.

RJ: Wow, that's a lot of surface area!

SG: It's a lot of fun. It encompasses our core application models, the runtime, the tools, and all the engines they run on top of. It's a lot of cool stuff, and a lot of things to play with.

RJ: Most people will remember you from your association with ASP.NET. Let's go back to the early days here at Microsoft. How did you get started?

SG: I started with the IIS team back in '96-'97, working on our core Web server technologies, and was involved in shipping a version of IIS. After IIS 4 was released, we started looking at next-generation Web programming model pieces. At the time, we thought, "Maybe we're done. Is there anything left to do in terms of feature set?"

We started talking with a lot of customers and looked hard at the types of applications they were building. We very quickly learned that there was still a lot left to do. People were struggling with code/ content separation and how to write clean code. We used to joke that "write once, read never" code was being produced. From a tooling and runtime administration perspective, there were many challenges in making our existing infrastructure work really well. To help make this happen, we formed a small team to think about future architectures with IIS. This is the team that invented the HTTP.SYS kernel driver that we introduced with Windows Server 2003. With a colleague, I started looking at Web programming model pieces and wrote the initial prototype for what became ASP.NET.

RJ: It seems that you were thinking of taking this to the next level and taking advantage of something that was super secret at the time. I remember those days of .NET; you used to call it ASP+ back then.

SG: We originally called it XSP; and people would always ask what the X stood for. At the time it really didn't stand for anything. XML started with that; XSLT started with that. Everything cool seemed to start with an X, so that's what we originally named it. In the first six months, we didn't use .NET. The CLR didn't exist—it was just starting around the same time we were—so, we were doing most of our prototyping in C++, JavaScript, and ActiveScript script engines. We knew we wanted an object-oriented environment, and we really liked the characteristics a managed programming model provided in terms of garbage collection, nice encapsulation, and object-orientation techniques. We actually started writing production code in C++, though, because at the time we didn't really have a good runtime platform on which to build. We got about two weeks into it when we met up with the CLR team; at the time that team had no partners inside the company building on top of them. The only compiler they had was this thing called "simple managed C," which we affectionately called "smack." We ended up saying, "Maybe we should build on this." It was a huge risk, and at the time our team consisted of three or four people total. We were allowed to take a bet on it mainly because nobody really cared if we failed. Thankfully, we did and it paid off in a huge way. The rest is history, so to speak.

RJ: I remember those days. In the early days of the CLR, few people were willing to take that bet. Many teams said, "I don't think so," but you guys did, and it paid off in a wonderful way.

SG: Yeah, people were just terrified of the whole idea of garbage collection on the server, which we take for granted today. They said, "There is no way you can build an app with garbage collection running in the background. Your server will never scale." There were lots of doomsday scenarios. From a project perspective, one of the things we did paid off in a huge way. We said, "We're going to bet on managed code, and it won't be a wrapper around some native stuff. We're going to bake it deeply into the platform. We're going to write about 95 percent of our code in managed code itself."

The reason we did that was twofold. One was to take full advantage of the extensibility it provided and really bake object-oriented extensibility very deeply into the platform. And, second, we knew that customer applications would be managed code and that our percentage of code on a call stack would be relatively small compared to the customer's share. If even we didn't think we could write in managed code, we were kidding ourselves if we thought customer applications would sail. It was a great forcing function. From day one through creating more complicated samples, we were tuning the core CLR engine along the way, and that translated into a huge customer savings when we started getting more complicated customer applications on top. It was a good bet.

RJ: It's interesting that you look at this as a way to drive improvement down into the engine. You said, "Not only are we doing this, but we're making the engine better by doing so."

SG: I think that was a huge bet, but it was an approach that worked out well. The fact that we were a small team and starting with a new code base helped tremendously. If we had been a larger team or had an existing large legacy code base, it would have been more difficult, because COM interoperability didn't exist back then. But the fact that we were starting from scratch and able to start small really helped drive those core improvements deep into the engine. As we got bigger and our feature set flushed itself out, it just kept paying dividends.

RJ: I think it's cool that the people who were managing you let you make that call.

SG: It was definitely a gamble, but it was a calculated one. There was a huge upside if we could make it work, but the downside was that there were three or four of us, and we could always do something new the next year. Microsoft has often made these big bets, and usually they pay off in a big way. Occasionally, they don't—and they can fail spectacularly—but, as a company, we try to make sure that we bet big on a couple of key things.

RJ: Did you have to persuade anybody to let you take the risk, or was it easier than that?

SG: We certainly had to persuade a number of people along the way. One thing we did early in the project was get running code in prototypes that we could show people. Often when you're working on a project that's new or something that hasn't been done before, it's easy to put together a bunch of PowerPoint slides that sound good, but it's especially valuable to actually show code and walk people through code that's running. Not only does the prototype prove that it's real, but also you just learn a terrific amount by doing it.

One of the things I try to do with my team is to prototype early, build sample apps early, especially demo apps that we can walk the customer through and say, "Look, here's how you can build an app." We try to do that as early as possible to learn what works and what doesn't, so we can react accordingly. About a month and a half into the ASP project I wrote a prototype, and we were able to walk people through. Here was this component control-driven model—we didn't call them controls back then; they were declarative tags or components—and here was this event-driven way to program for the Web. We were able to build apps and discovered quickly that some of the things we had come up with were really impossible to code. At the same time, we learned that "it would be really cool to have this feature, or that feature," and we iterated along the way. That helped tremendously when we were trying to help people realize that we weren't complete lunatics. We were able to show code, and they were able to get it. It was still a gamble.

RJ: It almost sounds like the test-driven development mindset. Let's do short iterations; let's get to something that works. We'll eat our own dog food, and we'll write against our own APIs to understand what it feels like to use them.

SG: It's definitely the same type of principle. I differentiate between test-driven development as a methodology for how you can drive quality early and how you can provide a base that lets you refactor and adapt your code base without having to worry about regressions. We certainly follow that philosophy internally when we develop production code. I think there's also value in doing a prototype phase even before you get to production code. That's one of the successful things that we did with ASP.NET. We said that we're going to throw away every line of code we're going to write for the next couple of months. Let's all agree on that. We're not going to say, "Oh let's take this and adapt it; we can clean it up." No. We're going to throw it away. We're going to "deltree" this subdirectory at some point, and that way we can be more adventurous about trying new things. We don't have to worry about making sure that everything's robust because it's going to be in the final version.

We actually did that for a few months and said, "We're done, delete it; let's start over from scratch; now let's write the full production code and make sure we bake in quality at the time." I think a lot of teams could benefit from that. The hardest thing is making sure you delete the prototype code. Too often, projects develop with "Well, it's kind of close." It's very difficult to start with a prototype and make it robust. I'm a firm believer in starting with a prototype phase and then deleting it.

RJ: It demonstrates that we value the learning more than we value these files and these bits from the prototype phase.

SG: Every time you work on a project, if you rewrite anything, whether it's from scratch or not, the code gets better. Partly, it's because you understand the problems and pitfalls of the last approach and can reflect and improve on it. The challenge is that you can't easily do that time and time again. But when you're first starting out on a project or a brand-new area where it isn't clear how you get from Point A to the finished product, having a dedicated period where you prototype and try things out is super valuable.

RJ: Some people call that the "architectural spike." Here's a new area, and we're going to explore. Changing directions, though, what were you doing before you came to Microsoft?

SG: I actually joined Microsoft right out of college. I interned with Microsoft while I was in college. I was involved in a couple of startups in college and high school, did some development, and had some fun there, but I joined Microsoft straight out of college.

RJ: We've been talking to a lot of people who find architecture interesting. There seem to be very few people who are purely architects in that they just design stuff and never write code. Most people are a mix: They spend some time developing, some time architecting. What advice would you give to somebody who has been doing development but wants to do more architectural thinking?

SG: Writing code is valuable for an architect. Not necessarily production code you check in, but constantly trying out new technologies, new approaches, and feeling how the system works. I don't write a lot of production code these days, but I spend an hour or two every day writing code. It may be samples, prototypes, or some fun personal project—whatever it is, I'm trying things out, thinking of ways to structure things. Being hands-on is very valuable from a code architect's perspective.

The other thing I would recommend is taking a look at core systems theory and how to architect very robust systems. Consider some of the principles you want to think about and apply them as you're doing it. That doesn't mean thinking about what the lines of code look like, but thinking about simplicity, or robustness, or fault tolerance. Those types of things are core in successful systems; whether it's a client application, server application, or a game. An architect who thinks hard about those kinds of principles and can marry them with a good coding background can provide a tremendous amount of guidance to teams.

Those principles are not about playing with a wizard or checking out cool new stuff, but studying how the process-address space works in a Windows or Unix application. What is threading, and how do you deeply internalize what it looks like on a multiprocessor or multicore system? It's about absorbing that type of knowledge, thinking about its ramifications, and spending some focused time thinking hard about the trends, where the technology is going from a hardware and a software perspective, and considering how to adapt and take advantage of it. That's what I recommend doing.

RJ: At Microsoft we have developers, program managers, and architects. People are often curious about the role of the architect. What's your expectation for the role of the architect on the team?

SG: There are a couple of responsibilities that we hope or expect an architect to bring to a team. One is a very deep, solid background in architecture, development, and the software principles I was talking about. With that type of background, our hope is that a process of osmosis will take place—that some of it will rub off on other team members. Hallway conversations or informal office chats can provide a tremendous amount of leadership to a team, especially when you supervise junior and senior developers.

We look for an architect to pave the way regarding what the product should be doing from a technical perspective. Often architects do more advanced prototyping work and investigations of where we should take the product. We look to them to recommend where we should go, and from an implementation perspective, we ask them to look at both the next-generation product and the current product to identify areas we should clean up. For example, which areas should we factor slightly differently? What are some practices we can implement throughout the code base to improve it?

RJ: In addition to deep, solid, technical skills, what other attributes do you think contribute to a successful architect?

SG: The hardest thing, at least at Microsoft, is that very deep technical people who want to go up the architect track need to make sure that they can marry their technical skills to an ability to work both within and across teams in a company.

Some of those softer skills are harder to build, meaning that an architect needs to be hands-on, but to do so in a way that doesn't threaten developers or other teams. They should also avoid "I own this, you own that" conversations. Architects have to be able to work across teams very flexibly. They need to do so in a way that doesn't leave people feeling as if the architect is just diving into the most interesting problem for the moment and then flying off when things get hard. Other team members have to believe that the architect is committed to the team and is part of a long-term relationship that provides value on a problem. Those are the types of skills an architect needs to develop. The super-senior architects who have the biggest impact can marry deep, deep technical and design skills with people skills and collaborative abilities.

RJ: A lot of people tell me is that the rate of change is accelerating and new stuff is coming out all the time. You mentioned how important it is to stay up-to-date on these things, but there are only so many hours in the day. How do you stay up-to-date?

SG: It's hard, especially in the development space. When I think of the pace of innovation that's going on right now and the rate of information flow, I certainly can't remember a time when it was going this fast. I think back to a time, the Internet battles of the '90s, when Internet Explorer was competing with Netscape. At the time, it felt as if we were shipping constantly, and there was a lot going on.

From the development perspective, I think we're in a phase right now where the pace is even more accelerated than it was then. It is certainly very hard to stay up-to-date. You have to find time to do it. You have to spend focused time keeping an eye on what is happening. I think blogs are a great mechanism for doing that. I subscribe to Bloglines, which is a great free service. I probably subscribe to 300 or 400 blogs, and I try to spend 20 to 30 minutes a day in the morning and the evening reading through what everyone posts. It gives you a good sense of what the hot topics and the interesting ideas are.

Part of keeping up means spending an hour a day of focused time doing prototyping; trying things out, either with your own product or other technologies; getting a good grasp on what pieces are out there and how you can use them. The other important task, when you're looking at any new technology, API, methodology, or programming approach, is to look hard not just at the interesting thing itself, but also try to extrapolate its useful principles so you can apply them elsewhere. So, if it's a Java refactoring book, great. There are some specific Java refactorings there, but what are the broader refactoring concepts you can internalize and apply to VB or C#? If it's an AJAX JavaScript framework that's very good at doing one specific task, great. Now, step back and try to recognize which of its aspects could be applied on another JavaScript framework. An architect should be good at looking at something and extrapolating the interesting aspect in and of itself, as opposed to the individual element of the technology.

RJ: As you look back over your years here at MS, is there anything you regret?

SG: As you look back, there are things you would do differently. Sometimes, it might be a technical thing you've done, the way you've implemented a feature, and you think, "Everyone abuses that feature." Or they do things not quite the way we intended them to be done. Certainly, when we've built a development platform as broad as .NET, I could come up with a dozen or so things that in hindsight that I wish we had done slightly differently. There are also ways that you approach things, or ways that you work with different teams and think, "Gosh, I wish I'd handled that conversation slightly differently." So, there are definitely lots of individual examples I could come up with.

Overall, I'm happy about where .NET is, so we've been fairly successful with where we've taken it. But there are lots of things I wish we'd done slightly differently, such as, "Gosh, I wish we hadn't sealed that class," or, "Gosh, I wish we hadn't unsealed that class."

If there's one significant thing I wish we'd done differently, it would be that we'd spent more time early on thinking hard about the client installation process for building .NET client apps. I think the approach we took with a single redistributable that you download is not any worse than any other Windows redistributable, but I wish we'd taken the opportunity early on to get a less impactful installation and simplify client-app deployment. That is something we're spending a lot of time on right now, and it's going to get dramatically better in the future, but I wish we'd done that six years ago and spent more time thinking through some of those scenarios a bit earlier.

RJ: In your office you have all these speaker badges going way back, and you've had chances to go many places and meet a lot of people. What highlights have you had? Is there anybody in particular that sticks out in your mind?

SG: One of the things that's fun about working on a developer platform is just seeing the range and diversity of apps people have built on our stuff. Whether it's MySpace, which is the largest social-networking platform in the world—there are a billion-and-a-half page views a day using .NET—or the London Stock Exchange or National Health Service of the U.K., or a whole bunch of companies on Wall Street, Costco, Dell.com, or Match.com, there are tons of cool customer apps built on Microsoft technology. Many of these are on the Web; others use different technology. If you go to the Walt Disney World properties, the meters that run the "Fast Pass tickets" run on the compact framework and the CLR. If someone knocks on the door from the U.S. Census or the U.S. Postal Service, the device that person is holding also runs on the .NET Framework.

That, for me, is the highlight: seeing how .NET is being used all over the place. Sometimes in weird, whacky ways, sometimes for mission-critical apps, but each time in a unique way that, frankly, you might not have thought of. I think the hallmark of a good framework doesn't lie in the applications people build on it that you had expected them to build, but in the fact that customers and developers were able to take it far beyond what you had imagined. For me, that's the highlight of .NET.

Scott Guthrie's Career at Microsoft

Scott Guthrie joined Microsoft in 1997 and first worked on IIS4 and the Windows NT Option Pack. Shortly after its release, he designed and prototyped a new server programming model originally codenamed "XSP," and together with Mark Anders subsequently formed and staffed a new team in 1998 to build what would ultimately be called ASP.NET.

Scott became production unit manager (PUM) of the ASP.NET team in early 2002, and shipped ASP.NET V1.1 as part of Windows Server 2003. During this time he also led the incubation of the popular Web Matrix development tool, a free ASP.NET development tool that helped spark new thinking about tools for Web development, as well as a new approach for targeting programming hobbyists and enthusiasts. In late 2002 he also became PUM of the Web tool features within Visual Studio and was responsible for the development of the new Visual Web Developer standalone product that will ship as part of the Visual Studio 2005 family, as well as all Web development features in Visual Studio. Visual Web Developer and ASP.NET 2.0 entered their first widespread public beta in the summer of 2004 and will ship in the first half of 2007.

In late 2003, Scott's team merged with the IIS team, and he became PUM of a unified Web Platform and Tools team that combines the assets of IIS, ASP.NET, and Visual Studio. Concurrent with finishing up ASP.NET 2.0 and Visual Web Developer, the team is now actively developing the next major version of Microsoft's Web Application Server, which will ship as part of Longhorn.

Now a general manager in Microsoft's Developer Division, Scott runs the development teams that build CLR, ASP.NET, WPF, "WPF/E," Windows Forms, IIS 7.0, Commerce Server, .NET Compact Framework, and the Visual Studio Web and Client Development Tools.

Scott graduated with a degree in computer science from Duke University in 1997.

This article was published in the Architecture Journal, a print and online publication produced by Microsoft. For more articles from this publication, please visit the Architecture Journal website.


 
 


--
Zhipeng Zhang (Alan)   BCompSc  MInfoTech MACS(Prov)

"You must be the change you wish to see in the world."

"Begin at the beginning and go on till you come to the end; then stop."
                                                                                       -- Lewis Carroll, Alice in Wonderland