Sidebar

startup_tutorial_and_checklist:design_configuration:design_tools:design_template_sets:language_specific_templates

Language / Device Specific Template Sets

Each template set has a column to set the language, and a column to specify a device1). By default, it is set to be used for "all languages" and "any device" - and this is what it should be set to if you only have a single language. If you do make use of multiple template sets, the best way to do that is have one "main" template set loaded at the end of the list that is set to "all languages" and "any device", and the majority of your design will be in that main template set. The others "above" it will be alterations to specific parts of the template set for different language or to give "device specific" changes, but these will usually just be "partial" template sets. They would still rely on your main template set loaded at the bottom for the majority of your design.

See the admin tool involved here:

You'll see the above mentioned:

  1. This allows you to set a specific template set for use with a specific language. The order of the template sets is important. Set the template for "any language" last in the list. The system starts at the top of the list and goes down until it finds a "language match" and "any language" matches any language.
  2. You can set a specific template set for use on specific devices using this admin tool setting. Make sure the "any device" template set you have is the last among the choices. The software starts at the top of that list and stops when it finds the first template set that matches the current device type. And note that "any device" matches them all. So put specific devices above "any device" or the selection will stop with "any device" and ignore any device specific templates below.

<tip c w>Note the template set is chosen at page load. That's basically when you link into the page. At that time the software detects which to use and chooses the template set accordingly. But note this "template change" can't happen between page loads. So if you are viewing your site using your desktop and then simply change the page width to see what the "mobile/tablet template set" looks like….you can't. Changing the page width just squeezes the desktop design. To see the "mobile/tablet template set" use a mobile or tablet to link into the site and see the results. The software detects the device to choose the template set. Once loaded if there is any RWD designed into the page viewed changing the page width would have effect.</tip>

Example configuration

This is how the different language / device2) options affect template set loading:

If a user is viewing the site with a specific language active - any template set that is set to the same language OR set to "any language" will be considered when loading templates for the user. See the example below:

  • Template Set Name - Language - Device3) <
  • my_templates_spanish - Spanish - Any Device <
  • my_templates_mobile - Any Language - Mobile/Tablet Only <
  • my_templates_desktop - Any Language - Desktop Only <
  • my_templates - Any Language - Any Device <

Now, say someone views your site and is using English language, and is browsing on a Desktop computer. Then the template sets it would load for this person are, in this order: my_templates_desktop, my_templates, default.

If that same person views the site on their mobile device or tablet, on English language, it would load the template sets my_templates_mobile, my_templates, default. If they changed the language, so that they are on Spanish, on a mobile device, it would load my_templates_spanish, my_templates_mobile, my_templates, default.

1) , 2) , 3)
NOTE: Device option added in version 7.3.0
startup_tutorial_and_checklist/design_configuration/design_tools/design_template_sets/language_specific_templates.txt · Last modified: 2017/04/21 09:47 by geojames