The internet is a global thing, yet we don't all speak the same language. This poses a number of challenges when building a website intended to be accessed by individuals from different parts of the world. A need often arises to have the website available in different languages. And you may wish to customise other locale parameters too, like currencies, contact details or shipping information.
RWML is a set of powerful stacks; comprising of a 'base' stack and a series of secondary stack elements. The RWML stacks were developed to help streamline the creation of comprehensive multilingual experiences on your websites. They work to both let the end user choose their preferred language (and remember it on future visits) and work to control the content shown or redirect users to applicable webpages. RWML is very-much the best solution for building a multilingual website in RapidWeaver and help you circumvent problems you may yet to have considered.
The RWML stacks are already used by hundreds of RapidWeaver users, in thousands of websites, which are accessed by millions of users. The system RWML offers has proven to be the best available. This second major revision of the RWML stacks provides added flexibility and optimisations.
What if your website is very small (perhaps only a dozen or fewer pages) and you don’t fancy the task of building subdivided websites for each language? RWML is perfectly capable of letting you switch and conditionally display language-specific content on the same page. We refer to this as a ‘dynamic’ setup; because the same webpage hosts content in multiple languages. The examples of RWML we have put together below are a prime example of how you can do language switching within the same webpage. In this configuration you would make use of the RWML Switcher stack again, but combined with stacks like the RWML Wrapper stack (this controls what content is shown, based on the selected language).
Below are several examples of RWML Language Switcher and RWML Wrapper stacks, using some random extracts of poetry in various languages. You can see how the process for a user to choose their preferred language is made very easy. And if you check your browser web developer console, you can see the tiny (and harmless) tracking cookie used to record the preferred language. If you come back to this webpage later, your language preference should've been remembered.
RWML is a set of powerful stacks; comprising of a 'base' stack and a series of secondary stack elements. The RWML stacks were developed to help streamline the creation of comprehensive multilingual experiences on your websites. They work to both let the end user choose their preferred language (and remember it on future visits) and work to control the content shown or redirect users to applicable webpages. RWML is very-much the best solution for building a multilingual website in RapidWeaver and help you circumvent problems you may yet to have considered.
The RWML stacks are already used by hundreds of RapidWeaver users, in thousands of websites, which are accessed by millions of users. The system RWML offers has proven to be the best available. This second major revision of the RWML stacks provides added flexibility and optimisations.
The two ways of using RWML
You have two main ways of using RWML. Firstly and most commonly, you can opt for the ‘subdivided’ configuration. This is simply another way of describing a website split into multiple ‘mini websites’; with each website or ‘subdivision’ hosting that particular language. Websites like Amazon.com, Apple.com and Google.com are a good example, where you see options to choose your preferred language or region and navigate into that subdivision of the website. The subdivision approach means that absolutely everything can be translated - including meta data, webpage links, all content - plus options to regionalise aspects of the website like currencies, shipping information and contact details. Search engines and social media typically like this configuration too. When building subdivided websites, you would typically have separate RapidWeaver project files for each website and make use of the RWML Switcher and Redirect stacks most commonly to guide users around.What if your website is very small (perhaps only a dozen or fewer pages) and you don’t fancy the task of building subdivided websites for each language? RWML is perfectly capable of letting you switch and conditionally display language-specific content on the same page. We refer to this as a ‘dynamic’ setup; because the same webpage hosts content in multiple languages. The examples of RWML we have put together below are a prime example of how you can do language switching within the same webpage. In this configuration you would make use of the RWML Switcher stack again, but combined with stacks like the RWML Wrapper stack (this controls what content is shown, based on the selected language).
Sample downloads
These sample RapidWeaver project files are in RapidWeaver 7 format, but should open in RapidWeaver 8 just fine. We are using the ThemeFlood Blank theme (a free download) for both examples. Both sample websites work with the demo or paid versions of RWML.- Subdivided setup - this example places each language on its own page and redirects users to their preferred language. Typically you would have RapidWeaver use a separate project file for each language, but this example simplifies the setup somewhat through use of some sub-directories.
- Dynamic setup - a single webpage to open in RapidWeaver, which toggles between English, Spanish, French and Italian. Similar to the examples posted below. This demonstrates how you could build multilingual webpages, instead of subdivided websites. This might be better-suited for smaller websites.
Examples
Below are several examples of RWML Language Switcher and RWML Wrapper stacks, using some random extracts of poetry in various languages. You can see how the process for a user to choose their preferred language is made very easy. And if you check your browser web developer console, you can see the tiny (and harmless) tracking cookie used to record the preferred language. If you come back to this webpage later, your language preference should've been remembered.
English
Seven Ages of ManAll the world's a stage,And all the men and women merely players, They have their exits and entrances, And one man in his time plays many parts, His acts being seven ages. At first the infant, Mewling and puking in the nurse's arms. Then, the whining schoolboy with his satchel And shining morning face, creeping like snail Unwillingly to school. And then the lover, Sighing like furnace, with a woeful ballad Made to his mistress' eyebrow. Then a soldier, Full of strange oaths, and bearded like the pard, Jealous in honour, sudden, and quick in quarrel, Seeking the bubble reputation Even in the cannon's mouth. And then the justice In fair round belly, with good capon lin'd, With eyes severe, and beard of formal cut, Full of wise saws, and modern instances, And so he plays his part. The sixth age shifts Into the lean and slipper'd pantaloon, With spectacles on nose, and pouch on side, His youthful hose well sav'd, a world too wide, For his shrunk shank, and his big manly voice, Turning again towards childish treble, pipes And whistles in his sound. Last scene of all, That ends this strange eventful history, Is second childishness and mere oblivion, Sans teeth, sans eyes, sans taste, sans everything.
William Shakespeare
English
Seven Ages of ManAll the world's a stage,And all the men and women merely players, They have their exits and entrances, And one man in his time plays many parts, His acts being seven ages. At first the infant, Mewling and puking in the nurse's arms. Then, the whining schoolboy with his satchel And shining morning face, creeping like snail Unwillingly to school. And then the lover, Sighing like furnace, with a woeful ballad Made to his mistress' eyebrow. Then a soldier, Full of strange oaths, and bearded like the pard, Jealous in honour, sudden, and quick in quarrel, Seeking the bubble reputation Even in the cannon's mouth. And then the justice In fair round belly, with good capon lin'd, With eyes severe, and beard of formal cut, Full of wise saws, and modern instances, And so he plays his part. The sixth age shifts Into the lean and slipper'd pantaloon, With spectacles on nose, and pouch on side, His youthful hose well sav'd, a world too wide, For his shrunk shank, and his big manly voice, Turning again towards childish treble, pipes And whistles in his sound. Last scene of all, That ends this strange eventful history, Is second childishness and mere oblivion, Sans teeth, sans eyes, sans taste, sans everything.
William Shakespeare
English
Seven Ages of ManAll the world's a stage,And all the men and women merely players, They have their exits and entrances, And one man in his time plays many parts, His acts being seven ages. At first the infant, Mewling and puking in the nurse's arms. Then, the whining schoolboy with his satchel And shining morning face, creeping like snail Unwillingly to school. And then the lover, Sighing like furnace, with a woeful ballad Made to his mistress' eyebrow. Then a soldier, Full of strange oaths, and bearded like the pard, Jealous in honour, sudden, and quick in quarrel, Seeking the bubble reputation Even in the cannon's mouth. And then the justice In fair round belly, with good capon lin'd, With eyes severe, and beard of formal cut, Full of wise saws, and modern instances, And so he plays his part. The sixth age shifts Into the lean and slipper'd pantaloon, With spectacles on nose, and pouch on side, His youthful hose well sav'd, a world too wide, For his shrunk shank, and his big manly voice, Turning again towards childish treble, pipes And whistles in his sound. Last scene of all, That ends this strange eventful history, Is second childishness and mere oblivion, Sans teeth, sans eyes, sans taste, sans everything.
William Shakespeare
English
Seven Ages of ManAll the world's a stage,And all the men and women merely players, They have their exits and entrances, And one man in his time plays many parts, His acts being seven ages. At first the infant, Mewling and puking in the nurse's arms. Then, the whining schoolboy with his satchel And shining morning face, creeping like snail Unwillingly to school. And then the lover, Sighing like furnace, with a woeful ballad Made to his mistress' eyebrow. Then a soldier, Full of strange oaths, and bearded like the pard, Jealous in honour, sudden, and quick in quarrel, Seeking the bubble reputation Even in the cannon's mouth. And then the justice In fair round belly, with good capon lin'd, With eyes severe, and beard of formal cut, Full of wise saws, and modern instances, And so he plays his part. The sixth age shifts Into the lean and slipper'd pantaloon, With spectacles on nose, and pouch on side, His youthful hose well sav'd, a world too wide, For his shrunk shank, and his big manly voice, Turning again towards childish treble, pipes And whistles in his sound. Last scene of all, That ends this strange eventful history, Is second childishness and mere oblivion, Sans teeth, sans eyes, sans taste, sans everything.
William Shakespeare
English
Seven Ages of ManAll the world's a stage,And all the men and women merely players, They have their exits and entrances, And one man in his time plays many parts, His acts being seven ages. At first the infant, Mewling and puking in the nurse's arms. Then, the whining schoolboy with his satchel And shining morning face, creeping like snail Unwillingly to school. And then the lover, Sighing like furnace, with a woeful ballad Made to his mistress' eyebrow. Then a soldier, Full of strange oaths, and bearded like the pard, Jealous in honour, sudden, and quick in quarrel, Seeking the bubble reputation Even in the cannon's mouth. And then the justice In fair round belly, with good capon lin'd, With eyes severe, and beard of formal cut, Full of wise saws, and modern instances, And so he plays his part. The sixth age shifts Into the lean and slipper'd pantaloon, With spectacles on nose, and pouch on side, His youthful hose well sav'd, a world too wide, For his shrunk shank, and his big manly voice, Turning again towards childish treble, pipes And whistles in his sound. Last scene of all, That ends this strange eventful history, Is second childishness and mere oblivion, Sans teeth, sans eyes, sans taste, sans everything.
William Shakespeare
English
Seven Ages of ManAll the world's a stage,And all the men and women merely players, They have their exits and entrances, And one man in his time plays many parts, His acts being seven ages. At first the infant, Mewling and puking in the nurse's arms. Then, the whining schoolboy with his satchel And shining morning face, creeping like snail Unwillingly to school. And then the lover, Sighing like furnace, with a woeful ballad Made to his mistress' eyebrow. Then a soldier, Full of strange oaths, and bearded like the pard, Jealous in honour, sudden, and quick in quarrel, Seeking the bubble reputation Even in the cannon's mouth. And then the justice In fair round belly, with good capon lin'd, With eyes severe, and beard of formal cut, Full of wise saws, and modern instances, And so he plays his part. The sixth age shifts Into the lean and slipper'd pantaloon, With spectacles on nose, and pouch on side, His youthful hose well sav'd, a world too wide, For his shrunk shank, and his big manly voice, Turning again towards childish treble, pipes And whistles in his sound. Last scene of all, That ends this strange eventful history, Is second childishness and mere oblivion, Sans teeth, sans eyes, sans taste, sans everything.
William Shakespeare
English
Seven Ages of ManAll the world's a stage,And all the men and women merely players, They have their exits and entrances, And one man in his time plays many parts, His acts being seven ages. At first the infant, Mewling and puking in the nurse's arms. Then, the whining schoolboy with his satchel And shining morning face, creeping like snail Unwillingly to school. And then the lover, Sighing like furnace, with a woeful ballad Made to his mistress' eyebrow. Then a soldier, Full of strange oaths, and bearded like the pard, Jealous in honour, sudden, and quick in quarrel, Seeking the bubble reputation Even in the cannon's mouth. And then the justice In fair round belly, with good capon lin'd, With eyes severe, and beard of formal cut, Full of wise saws, and modern instances, And so he plays his part. The sixth age shifts Into the lean and slipper'd pantaloon, With spectacles on nose, and pouch on side, His youthful hose well sav'd, a world too wide, For his shrunk shank, and his big manly voice, Turning again towards childish treble, pipes And whistles in his sound. Last scene of all, That ends this strange eventful history, Is second childishness and mere oblivion, Sans teeth, sans eyes, sans taste, sans everything.
William Shakespeare
English
Seven Ages of ManAll the world's a stage,And all the men and women merely players, They have their exits and entrances, And one man in his time plays many parts, His acts being seven ages. At first the infant, Mewling and puking in the nurse's arms. Then, the whining schoolboy with his satchel And shining morning face, creeping like snail Unwillingly to school. And then the lover, Sighing like furnace, with a woeful ballad Made to his mistress' eyebrow. Then a soldier, Full of strange oaths, and bearded like the pard, Jealous in honour, sudden, and quick in quarrel, Seeking the bubble reputation Even in the cannon's mouth. And then the justice In fair round belly, with good capon lin'd, With eyes severe, and beard of formal cut, Full of wise saws, and modern instances, And so he plays his part. The sixth age shifts Into the lean and slipper'd pantaloon, With spectacles on nose, and pouch on side, His youthful hose well sav'd, a world too wide, For his shrunk shank, and his big manly voice, Turning again towards childish treble, pipes And whistles in his sound. Last scene of all, That ends this strange eventful history, Is second childishness and mere oblivion, Sans teeth, sans eyes, sans taste, sans everything.
William Shakespeare
English
Seven Ages of ManAll the world's a stage,And all the men and women merely players, They have their exits and entrances, And one man in his time plays many parts, His acts being seven ages. At first the infant, Mewling and puking in the nurse's arms. Then, the whining schoolboy with his satchel And shining morning face, creeping like snail Unwillingly to school. And then the lover, Sighing like furnace, with a woeful ballad Made to his mistress' eyebrow. Then a soldier, Full of strange oaths, and bearded like the pard, Jealous in honour, sudden, and quick in quarrel, Seeking the bubble reputation Even in the cannon's mouth. And then the justice In fair round belly, with good capon lin'd, With eyes severe, and beard of formal cut, Full of wise saws, and modern instances, And so he plays his part. The sixth age shifts Into the lean and slipper'd pantaloon, With spectacles on nose, and pouch on side, His youthful hose well sav'd, a world too wide, For his shrunk shank, and his big manly voice, Turning again towards childish treble, pipes And whistles in his sound. Last scene of all, That ends this strange eventful history, Is second childishness and mere oblivion, Sans teeth, sans eyes, sans taste, sans everything.
William Shakespeare
English
Seven Ages of ManAll the world's a stage,And all the men and women merely players, They have their exits and entrances, And one man in his time plays many parts, His acts being seven ages. At first the infant, Mewling and puking in the nurse's arms. Then, the whining schoolboy with his satchel And shining morning face, creeping like snail Unwillingly to school. And then the lover, Sighing like furnace, with a woeful ballad Made to his mistress' eyebrow. Then a soldier, Full of strange oaths, and bearded like the pard, Jealous in honour, sudden, and quick in quarrel, Seeking the bubble reputation Even in the cannon's mouth. And then the justice In fair round belly, with good capon lin'd, With eyes severe, and beard of formal cut, Full of wise saws, and modern instances, And so he plays his part. The sixth age shifts Into the lean and slipper'd pantaloon, With spectacles on nose, and pouch on side, His youthful hose well sav'd, a world too wide, For his shrunk shank, and his big manly voice, Turning again towards childish treble, pipes And whistles in his sound. Last scene of all, That ends this strange eventful history, Is second childishness and mere oblivion, Sans teeth, sans eyes, sans taste, sans everything.
William Shakespeare
English
Seven Ages of ManAll the world's a stage,And all the men and women merely players, They have their exits and entrances, And one man in his time plays many parts, His acts being seven ages. At first the infant, Mewling and puking in the nurse's arms. Then, the whining schoolboy with his satchel And shining morning face, creeping like snail Unwillingly to school. And then the lover, Sighing like furnace, with a woeful ballad Made to his mistress' eyebrow. Then a soldier, Full of strange oaths, and bearded like the pard, Jealous in honour, sudden, and quick in quarrel, Seeking the bubble reputation Even in the cannon's mouth. And then the justice In fair round belly, with good capon lin'd, With eyes severe, and beard of formal cut, Full of wise saws, and modern instances, And so he plays his part. The sixth age shifts Into the lean and slipper'd pantaloon, With spectacles on nose, and pouch on side, His youthful hose well sav'd, a world too wide, For his shrunk shank, and his big manly voice, Turning again towards childish treble, pipes And whistles in his sound. Last scene of all, That ends this strange eventful history, Is second childishness and mere oblivion, Sans teeth, sans eyes, sans taste, sans everything.
William Shakespeare
English
Seven Ages of ManAll the world's a stage,And all the men and women merely players, They have their exits and entrances, And one man in his time plays many parts, His acts being seven ages. At first the infant, Mewling and puking in the nurse's arms. Then, the whining schoolboy with his satchel And shining morning face, creeping like snail Unwillingly to school. And then the lover, Sighing like furnace, with a woeful ballad Made to his mistress' eyebrow. Then a soldier, Full of strange oaths, and bearded like the pard, Jealous in honour, sudden, and quick in quarrel, Seeking the bubble reputation Even in the cannon's mouth. And then the justice In fair round belly, with good capon lin'd, With eyes severe, and beard of formal cut, Full of wise saws, and modern instances, And so he plays his part. The sixth age shifts Into the lean and slipper'd pantaloon, With spectacles on nose, and pouch on side, His youthful hose well sav'd, a world too wide, For his shrunk shank, and his big manly voice, Turning again towards childish treble, pipes And whistles in his sound. Last scene of all, That ends this strange eventful history, Is second childishness and mere oblivion, Sans teeth, sans eyes, sans taste, sans everything.
William Shakespeare
English
Seven Ages of ManAll the world's a stage,And all the men and women merely players, They have their exits and entrances, And one man in his time plays many parts, His acts being seven ages. At first the infant, Mewling and puking in the nurse's arms. Then, the whining schoolboy with his satchel And shining morning face, creeping like snail Unwillingly to school. And then the lover, Sighing like furnace, with a woeful ballad Made to his mistress' eyebrow. Then a soldier, Full of strange oaths, and bearded like the pard, Jealous in honour, sudden, and quick in quarrel, Seeking the bubble reputation Even in the cannon's mouth. And then the justice In fair round belly, with good capon lin'd, With eyes severe, and beard of formal cut, Full of wise saws, and modern instances, And so he plays his part. The sixth age shifts Into the lean and slipper'd pantaloon, With spectacles on nose, and pouch on side, His youthful hose well sav'd, a world too wide, For his shrunk shank, and his big manly voice, Turning again towards childish treble, pipes And whistles in his sound. Last scene of all, That ends this strange eventful history, Is second childishness and mere oblivion, Sans teeth, sans eyes, sans taste, sans everything.
William Shakespeare
Why no flags to choose languages? Flags represent nations, not languages. This is a mistake some web designers frequently make. It is considered poor practice to use flags in language switchers UNLESS you are trying to represent nation-specific content.
There are over ten language switcher types available to choose from in RWML. Some work well in a website header, content area or footer; whereas others are more compact in design making them better-suited for theme sidebars and ExtraContent areas. Please note that the 'Bootstrap' language switcher types require a compatible Bootstrap theme, like one of the free or paid theme designs offered through ThemeFlood.com.
Custom menu bar items, text and images can be easily configured to act as RWML language switchers too. Simply apply links and set the link as a query string like
?lang="en"
or ?lang="fr"
or ?lang="es"
to toggle the desired language. Until a valid language selection is made, the default language is used.RWML Setup
You will want to get the RWML stacks installed in Stacks / RapidWeaver in the normal way. If you do not know how to do this, you can ask for help on the RapidWeaver forums.- Open the Stacks library and search for ‘RWML’ in the search box to find them. RWML stacks are listed in alphabetical order.
- Always add a RWML Base stack to the webpage first. This is where you configure what languages your website supports and change other settings. A RWML Base stack must be present on every webpage. It will automatically change the page extension from
.html
to.php
so you don’t have to do this in the Page Inspector yourself. The RWML Base stack can be setup as a partial; letting you quickly include it across multiple pages of the website. - Add RWML Language Switcher stacks to wherever you want to display a language switcher. You can safely use multiple RWML Language Switch stacks on the same page (as we did above). Some people like having a language switcher at the top (in a header or sidebar) and another towards the bottom in the footer.
- If building a segregated website (a website split into multiple parts, with each language on its own page), you will want to make use of stacks like RWML Redirect, to redirect website users to another page, based on their selected language. Likewise if switching content on the same page, the RWML Wrapper stack will be the one you commonly use.
We recommend RWML stacks are used on a web server running PHP 7.1 or greater (check with your hosting company if in doubt). All of the RWML stacks display instructions in edit mode, so you can read and understand exactly what the stack does and how to use it. All the settings in each stack also present informational tooltips, when you mouseover them.
Developer API
RWML is immensely powerful. If you are building advanced websites with RapidWeaver or you are a RapidWeaver add-on developer, you can regulate what is loaded or shown on the page using this PHP code snippet:<?php if(isset($rwml)) { if($rwml->isActiveLanguage("es")) : ?>
<h1>I am Spanish content</h1>
<?php endif; } ?>
In this example, the text 'I am Spanish content' will only get shown if the user has chosen Spanish (es) as their preferred language (the active language). This PHP code can encapsulate other PHP code, HTML, CSS and Javascript. Think of it like a simple 'if' function; checking the language and conditionally loading the contents. This is better than using older
lang="xx"
HTML attributes on page elements, although these will still work.Free demo
RWML is a sophisticated set of stacks with immense power and flexibility. The free demo version provides a wonderful way to experiment with RWML and build a test site you can demonstrate to clients or suchlike. The free demo can be downloaded using the button at the top of this page. Like with the other demo stacks we provide, only limitation with the demo is that automatic updates are disabled and the webpage is watermarked 'RWML Demo Version'. Other than that, there are no other time or feature limitations imposed. Purchasing and downloading a copy of RWML licenses the stack in your name, removes the watermark and entitles you to expert technical support direct from the developer, plus updates.Privacy Settings
You are welcome to change your privacy preferences here.
By using this website, you agree to the privacy policy