Template Site Text
The Template Site Text feature of Aurora allows you to manage Site Text using files located in the templates directory
Introduction
Site Text can optionally be managed using files that are stored in your templates site-text
directory - this is an alternative to Managing Site Text With Aurora.
Supported file formats
The following file formats are supported:
Format Name | File extension(s) |
---|---|
YAML | yaml / yml |
Smarty Config | cfg |
Export existing Site Text
To help you get started with authoring your Site Text files, existing Site Text can be exported.
The export functionality can be found under Store > Settings > Front-End > Template Site Text.
Use the Export Smarty Config and Export YAML buttons to start the exports.
The export process will create ZIP archives which you can download.

The export process can take some time, depending on the amount of content to export.
An export time of 15 minutes can be expected.
Exports will remain downloadable for up to 90 days.
Authoring Site Text files
Each item of Site Text is uniquely identified by its "Page" and "Part" value.
Section | Description | Example Value |
---|---|---|
Page | Traditionally the page or section in which the piece of Site Text will primarily reside | Checkout Order Complete |
Part | A unique name to describe the piece of Site Text | Label: Delivery Type |
File naming conventions
Site Text file names must adhere to the following naming convention:PAGE_LANGUAGE.EXT
.
The following table describes the components of the naming convention:
Component | Description | Notes |
---|---|---|
PAGE | Page value | The value up to the final underscore character will be used as the Site Text "Page" value. Must be at most 255 characters in length. |
LANG | Language | Must be in ISO language code format Must correspond to a valid Aurora language ISO code |
EXT | File extension | Must correspond to a supported file format |
Example file names:
File name | Page | Language | Extension |
---|---|---|---|
Basket_en-gb.yml | Basket | en-gb | yml |
Checkout_Pending_Order_fr.yml | Checkout Pending Order | fr | yml |
Email_To_Friend_es.cfg | Email To Friend | es | cfg |
Only files that match the naming convention will be considered Site Text files, all others will be ignored.
The following table shows some examples that do not match the naming convention:
File name | Reason |
---|---|
Header.yaml | No language |
Header_en-gb.txt | Not a supported extension |
YAML format
The following is an example of a YAML Site Text file:
-
part: 'easy returns'
content: 'Easy Returns'
-
part: 'label: grand total vat'
content: 'Grand VAT Total'
-
part: 'label: home delivery'
content: 'Home Delivery'
- Each item must contain
part
andcontent
key with a scalar value. part
must have a maximum length of 255 characters
Smarty Config format
The following is an example of a Smarty Config Site Text file:
easy_returns = "Easy Returns"
[label]
grand_total_vat = "Grand VAT Total"
home_delivery = "Home Delivery"
In Smarty Config, variables can be global or in any numbers of sections.
Sections are denoted by strings enclosed in []
, such as [label]
in the above example.
Variables that come before all sections are global variables, such as easy_returns
in the above example.
The Site Text "Part" value is taken from either:
- The global variable name
- The section name and section variable name formed as
SECTION_NAME: VARIABLE_NAME
In the above example, this would be:label: grand_total_vat
label: home_delivery
The Site Text "Part" value must be at most 255 characters in length.
Smarty Config restrictions
The Smarty Config format has the following restrictions:
Component | Description | Replacement character | Notes |
---|---|---|---|
Sections | Cannot contain spaces | _ | |
Keys | Cannot contain any character that is not alphanumeric or underscore | _ | |
Keys | Cannot consist entirely of digits | N/A | Character replacement isn't appropriate. Ensure the key contains an alphanumeric character |
For more information on the Smarty Config format please see the Official Documentation
Part value normalisation
Aurora must normalise all Site Text "Part" values to conform to the restrictions of all supported file formats, regardless of the format being used.
This normalisation converts any character that is not _
or alphanumeric, to _
, and converts the entire string to lowercase.
Under some circumstances, this normalisation could result in clashes.
For example, the following Site Text "part" values would all be normalised to label_for__
:
Label for $
Label for £
Label for ?
LABEL FOR ?
For this reason, care should be taken when organising Site Text to avoid using non-alphanumeric characters in a way that could cause clashes.
Enabling Template Site Text
Template Site Text can be enabled from Store > Settings > Front-End > Template Site Text.
Check Enable Template Site Text and click the Apply button at the bottom of the page.

When Template Site Text is enabled you will no longer be able to edit Site Text directly in Aurora
Refreshing Site Text
Site Text files must be stored in the site-text
folder in your templates folder.
Nested directories are supported up to 10 levels deep, with any files beyond this depth being ignored.
Site Text files are not automatically imported, so when your files are ready, go to Content > Site Text.
Click Refresh Site Text to begin the refresh process.

The status of the refresh process will automatically update:

The process will go from Pending, to Running, to Completed:

Last refresh status information will be available for up to 90 days
Refresh Errors
If any errors are encountered while performing the refresh, this will be presented on screen as follows:

Click the link to the Site Text Refresh Error Log to view the details.
Site Text Refresh Error Log
The Site Text Refresh Error log is located at Tools > Logs > Site Text > Refresh Error Log.
This log details all errors that occurred during the most recent refresh.

After reviewing the errors, fix the relevant files, and perform another refresh.
Missing Site Text Log
The Missing Site Text Log is located at Tools > Logs > Site Text > Missing Text Log.
This log details any Site Text that has been requested which is not present on the system.
The Site Text page
part
and language
parameters are detailed.

The above example would correspond with the following site_text
Smarty method usage:
{site_text page="Member Login" part="Error: Please Enter a Password" language_id="1"}
After reviewing the missing Site Text, update or create the relevant Site Text file(s) and perform a Site Text Refresh.
Updated 6 months ago