Tags
These terms are used throughout the documentation:
required: This parameter/field is required for this tag to function.
form only: This can only be set as a field in the form and not as a parameter in the tag.
param only: This parameter can only be set in the tag and not as a field in the form.
fixed value: This field cannot be edited and is set with a fixed value.
recurring only: This parameter/field only applies to recurring charges.
one-time only: This parameter/field only applies to one-time charges.
added in X.X.X: This parameter/field is only available from this version forward.
logged in: This tag is only available if the user is logged in.
required: This parameter/field is required for this tag to function.
form only: This can only be set as a field in the form and not as a parameter in the tag.
param only: This parameter can only be set in the tag and not as a field in the form.
fixed value: This field cannot be edited and is set with a fixed value.
recurring only: This parameter/field only applies to recurring charges.
one-time only: This parameter/field only applies to one-time charges.
added in X.X.X: This parameter/field is only available from this version forward.
logged in: This tag is only available if the user is logged in.
Transcribe has the following front-end tags:
{exp:transcribe:breadcrumbs}
- This tag allows you to setup a breadcrumb trail on Structure pages that reflects the language specific trail
{exp:transcribe:entries}
- Is compatible with most of the Channel Entries tag's parameters but will only output entries for the user's selected language.
{exp:transcribe:entry_ids}
- Outputs the entry ids in the channel specified for the current language.
{exp:transcribe:language}
- Sets the language to be used from the template. This can be used to override the default behavior of Transcribe which is to figure out what language to load automatically. *Note* this will lock the template to whichever language is set for it. Language switchers will break if this tag overrides them
{exp:transcribe:language:abbreviation}
- Useful for front-end (HTML/CSS) development. Alternatively {transcribe:language_abbreviation} can be used as an early parse order variable to return the current language abbreviation
{transcribe:segment_X}
- Returns the segment as it appears in the browser (except for the language abbreviation). This is an early parse order variable and should be used in place of the native segment variables, which do not reflect template translations.
{transcribe:last_segment}
- Returns the last segment as it appears in the browser (except for the language abbreviation). This is an early parse order variable.
{exp:transcribe:language_links}
- Retrieve an array of available languages for the current site. Can be used in the template to create a language switcher. Using the entry_id parameter in conjunction with the has_entry parameter will only output links for languages that have entries related to the entry_id passed in.<a href='/transcribe/documentation/language_switcher'>Show me specific examples</a>
{exp:transcribe:no_match}
- This tag allows you to specify URLs that you don't want the language switcher to place the user on when changing languages. When used with the segment parameter, if the segment specified is found anywhere in the URL the user won't be placed on the translated version of that page. When this tag is used, Transcribe will look further back in the ExpressionEngine browsing history to determine the page that the user should be placed on.
{exp:transcribe:replace}
- Outputs the translated content variable of the current language with the id or name specified.
{exp:transcribe:translate}
- This tag pair replaces the content between the tags with the translated content variable of the current language with the id or name specified. If a variable isn't found in the selected language, Transcribe will fallback to the content between the tag pair.
{exp:transcribe:uri}
- Outputs the path specified in it's translated state for the current language. Used as a replacement to path=.
{exp:transcribe:breadcrumbs}
This tag allows you to setup a breadcrumb trail on Structure pages that reflects the language specific trail
Tag Parameters
- leading_slashyes/no
- adds a leading slash to the urlaccepts: "y", "n"Default: n
{exp:transcribe:breadcrumb leading_slash="y"}
- trailing_slashyes/no
- adds a trailing slash to the urlaccepts: "y", "n"Default: n
{exp:transcribe:breadcrumb trailing_slash="y"}
Variables
- site_url
- Website URL with language abbreviation if injected
{site_url}
- crumb_uri
- uri for a given crumb
{crumb_uri}
- firstboolean
- Boolean TRUE for first crumb
{first}
- lastboolean
- Boolean TRUE for last crumb
{last}
- breadcrumb:title
- entry title
{bredcrumb:title}
- entry_idinteger
- entry_id for this crumb item
{entry}
{exp:transcribe:entries}
Is compatible with most of the Channel Entries tag's parameters but will only output entries for the user's selected language.
Tag Parameters
- transcribe_add_langstring
- Pipe separated list of additional languages to include.
{exp:transcribe:entries transcribe_add_lang="ren|es|f"}
- fallback_langstring
- Pipe separated list of language abbreviations. Will include entries from these languages ONLY if they do not have a related entry in current active language
{exp:transcribe:entries fallback_lang="ren|es|f"}
- lookup_relatedyes/no
- Prevents Transcribe from looking up related entries. This is useful if you are passing a full list of entry_ids that include multiple languages and you want Transcribe to only use the ones for the user's current language.accepts: "y", "n"Default: y
{exp:transcribe:entries lookup_related="n"}
{exp:transcribe:entries lookup_related="n"}
{exp:transcribe:entry_ids}
Outputs the entry ids in the channel specified for the current language.
Tag Parameters
- channelstring
- Channel name
{exp:transcribe:entry_ids channel="your-channel"}
- sitestring
- MSM site short name to load entries from.
{exp:transcribe:entry_ids site="your-MSM-site"}
{exp:transcribe:language}
Sets the language to be used from the template. This can be used to override the default behavior of Transcribe which is to figure out what language to load automatically. *Note* this will lock the template to whichever language is set for it. Language switchers will break if this tag overrides them
Tag Parameters
- idinteger
- The variable id to use.
{exp:transcribe:translate id="12"}
- namestring
- The vaiable name to use.
{exp:transcribe:translate name="English"}
{exp:transcribe:language:abbreviation}
Useful for front-end (HTML/CSS) development. Alternatively {transcribe:language_abbreviation} can be used as an early parse order variable to return the current language abbreviation
Examples
- simple example
- Output language abbreviation of current language.
{exp:transcribe:language:abbreviation}
es
{transcribe:segment_X}
Returns the segment as it appears in the browser (except for the language abbreviation). This is an early parse order variable and should be used in place of the native segment variables, which do not reflect template translations.
Examples
- simple example
- Output URL segments, honoring translations
{transcribe:segment_1} - {transcribe:segment_2} - {transcribe:segment_3}
URL http://domain.com/fr/foo/bar/test outputs foo - bar - test
{transcribe:last_segment}
Returns the last segment as it appears in the browser (except for the language abbreviation). This is an early parse order variable.
Examples
- simple example
- Output the last URL segment, honoring translations
{transcribe:last_segment}
URL http://domain.com/fr/foo/bar/test outputs test
{exp:transcribe:language_links}
Retrieve an array of available languages for the current site. Can be used in the template to create a language switcher. Using the entry_id parameter in conjunction with the has_entry parameter will only output links for languages that have entries related to the entry_id passed in.Show me specific examples
Tag Parameters
- allowed_langsstring
- Pipe separated list of language abbreviations to output links for. Useful for msm sites to only output links for languages that are allowed to be used on the current site. Or for more customizable language switchers.
{exp:transcribe:language_links allowed_langs="en|fr|es"}
- entry_idinteger
- current entry id being used.
{exp:transcribe:language_links entry_id="12"}
- has_entryyes/no
- Using the entry_id parameter in conjunction with the has_entry parameter will only output links for languages that have entries related to the entry_id passed inaccepts: "y", "n"Default: y
{exp:transcribe:language_links has_entry="y"}
- show_allyes/no
- This will show all language links. Even for languages disabled in the CP. Super Admins will see all languages regardless of being disabled or not.accepts: "y", "n"Default: y
{exp:transcribe:language_links show_all="y"}
Variables
- id
- id of the language
{id}
- name
- name of the language
{name}
- abbreviation
- abbreviation of the language
{abbreviation}
- link
- link to the action url to switch to the language
{link}
- currentboolean
- true if this language is the currently selected language; false otherwise.
{current}
- rel:entry_id
- entry_id for the related language specific entry. It must be prefixed and only outputs the related entry_id when used only be used in conjunction with the has_entry and entry_id params
{rel:entry_id}
Conditional Variables
- no_lang_abbreviation
- used for logic in the language switcher
{if no_en} Do something {/if}
{exp:transcribe:no_match}
This tag allows you to specify URLs that you don't want the language switcher to place the user on when changing languages. When used with the segment parameter, if the segment specified is found anywhere in the URL the user won't be placed on the translated version of that page. When this tag is used, Transcribe will look further back in the ExpressionEngine browsing history to determine the page that the user should be placed on.
Tag Parameters
- urlstring
- The url you do not want Transcribe to use when switching languages
{exp:transcribe:no_match url="/css/style.css"}
{exp:transcribe:no_match url="/css/pageNotToTranslate"}
- segmentstring
- When this segment is found in the URL the language switcher will not try to switch languages to this URL
{exp:transcribe:no_match segment="Dont translate me"}
Tag Parameters
- uristring
- The uri to get related pages for.
{exp:transcribe:related_pages status="open" uri="{segment_1}/{segment_2}/{segment_3}"}
{title} - {rel:title}<br>
{languages}
{id}<br>
{rel:entry_id}<br>
{rel:title}<br>
{name}<br>
{enabled} {if enabled}is enabled{/if}<br>
{abbreviation}<br>
{link}<br>
{current} {if current}current{/if}<br>
{/languages}
<br>
{/exp:transcribe:related_pages}
Variables
- idinteger
- The language id
- rel:entry_idinteger
- The entry id of the related page
- rel:titlestring
- The title of the related page
- namestring
- The name of the language
- enabledboolean
- Whether the language is enabled
- abbreviationstring
- The abbreviation of the language
- linkstring
- The link to the language
- currentboolean
- Whether the language is the current language
{exp:transcribe:replace}
Outputs the translated content variable of the current language with the id or name specified.
Tag Parameters
- idinteger
- The variable id to use.
{exp:transcribe:translate id="12"}
- namestring
- The vaiable name to use.
{exp:transcribe:translate name="English"}
- sitestring
- "msm site short name" allows you to pull a variable from a specified MSM site
{exp:transcribe:replace site="Your Site" }
- langstring
- "lang abbreviation" sets the language for a given variable
{exp:transcribe:replace lang="English" }
{exp:transcribe:translate}
This tag pair replaces the content between the tags with the translated content variable of the current language with the id or name specified. If a variable isn't found in the selected language, Transcribe will fallback to the content between the tag pair.
Tag Parameters
- idinteger
- The variable id to use.
{exp:transcribe:translate id="12"}
- namestring
- The vaiable name to use.
{exp:transcribe:translate name="English"}
- sitestring
- "msm site short name" allows you to pull a variable from a specified MSM site
{exp:transcribe:translate site="your_site"}
- langstring
- "lang abbreviation" sets the language for a given variable
{exp:transcribe:translate lang="lang abbreviaation"}
{exp:transcribe:uri}
Outputs the path specified in it's translated state for the current language. Used as a replacement to path=.
Tag Parameters
- pathstring
- The path to output.
{exp:transcribe:uri path="group/template"}
- site_urlyes/no
- This removes the site_url from the returned urlaccepts: "y", "n"Default: y
{exp:transcribe:uri site_url="no"
- entry_idinteger
- entry id
{exp:transcribe:uri entry_id="12"}
- langstring
- "lang abbreviation"
{exp:transcribe:uri lang="lang abbreviaation"}
- trim_slashesyes/no
- This removes slashes from the returned urlaccepts: "y" , "n"Default: n
{exp:transcribe:uri trim_slashes="y"}