2022-04-02 13:30:16 +00:00
<!DOCTYPE html>
2022-11-01 01:10:49 +00:00
< html lang = "pir" dir = "ltr" >
2022-04-02 13:30:16 +00:00
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0" >
2022-10-31 13:52:10 +00:00
< meta name = "generator" content = "Hugo 0.105.0" >
2022-11-10 09:09:19 +00:00
< meta name = "generator" content = "Relearn 5.5.3+tip" >
2022-04-02 13:30:16 +00:00
< meta name = "description" content = "Documentation for Hugo Relearn Theme" >
< meta name = "author" content = "Sören Weber" >
< title > Multilingual an' i18n :: Cap' n Hugo Relearrrn Theme< / title >
2022-11-15 06:35:08 +00:00
< link href = "https://McShelby.github.io/hugo-theme-relearn/pir/cont/i18n/index.html" rel = "canonical" type = "text/html" title = "Multilingual an' i18n :: Cap'n Hugo Relearrrn Theme" >
2022-11-06 00:38:34 +00:00
< link href = "../../../pir/cont/i18n/index.xml" rel = "alternate" type = "application/rss+xml" title = "Multilingual an' i18n :: Cap'n Hugo Relearrrn Theme" >
2022-11-17 21:13:11 +00:00
< link href = "../../../images/logo.svg?1668719586" rel = "icon" type = "image/svg+xml" >
2022-07-15 13:20:02 +00:00
<!-- https://github.com/filamentgroup/loadCSS/blob/master/README.md#how - to - use -->
2022-11-17 21:13:11 +00:00
< link href = "../../../css/fontawesome-all.min.css?1668719587" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "../../../css/fontawesome-all.min.css?1668719587" rel = "stylesheet" > < / noscript >
< link href = "../../../css/featherlight.min.css?1668719587" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "../../../css/featherlight.min.css?1668719587" rel = "stylesheet" > < / noscript >
< link href = "../../../css/auto-complete.css?1668719587" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "../../../css/auto-complete.css?1668719587" rel = "stylesheet" > < / noscript >
< link href = "../../../css/perfect-scrollbar.min.css?1668719587" rel = "stylesheet" >
< link href = "../../../css/nucleus.css?1668719587" rel = "stylesheet" >
< link href = "../../../css/fonts.css?1668719587" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "../../../css/fonts.css?1668719587" rel = "stylesheet" > < / noscript >
< link href = "../../../css/theme.css?1668719587" rel = "stylesheet" >
< link href = "../../../css/theme-relearn-light.css?1668719587" rel = "stylesheet" id = "variant-style" >
< link href = "../../../css/ie.css?1668719587" rel = "stylesheet" >
< link href = "../../../css/variant.css?1668719587" rel = "stylesheet" >
< link href = "../../../css/print.css?1668719587" rel = "stylesheet" media = "print" >
< link href = "../../../css/format-print.css?1668719587" rel = "stylesheet" >
< script src = "../../../js/variant.js?1668719587" > < / script >
2022-04-02 13:30:16 +00:00
< script >
// hack to let hugo tell us how to get to the root when using relativeURLs, it needs to be called *url= for it to do its magic:
// https://github.com/gohugoio/hugo/blob/145b3fcce35fbac25c7033c91c1b7ae6d1179da8/transform/urlreplacers/absurlreplacer.go#L72
2022-11-05 23:35:48 +00:00
window.index_js_url="../../../pir/index.search.js";
var root_url="../../../";
2022-04-02 13:30:16 +00:00
var baseUri=root_url.replace(/\/$/, '');
// translations
window.T_Copy_to_clipboard = 'Copy t\u0027 clipboard';
window.T_Copied_to_clipboard = 'Copied t\u0027 clipboard!';
window.T_Copy_link_to_clipboard = 'Copy link t\u0027 clipboard';
window.T_Link_copied_to_clipboard = 'Copied link t\u0027 clipboard!';
2022-11-17 21:13:11 +00:00
window.T_No_results_found = 'No rrresults found fer \u0022{0}\u0022';
window.T_N_results_found = '{1} rrresults found fer \u0022{0}\u0022';
2022-04-02 13:30:16 +00:00
// some further base stuff
var baseUriFull='https:\/\/McShelby.github.io\/hugo-theme-relearn/';
2022-07-14 20:20:11 +00:00
window.variants & & variants.init( [ 'relearn-light', 'relearn-dark', 'learn', 'neon', 'blue', 'green', 'red' ] );
2022-04-02 13:30:16 +00:00
< / script >
2022-11-17 21:13:11 +00:00
< script src = "../../../js/jquery.min.js?1668719587" defer > < / script >
2022-04-02 13:30:16 +00:00
< / head >
2022-11-15 06:35:08 +00:00
< body class = "mobile-support print disableInlineCopyToClipboard" data-url = "../../../pir/cont/i18n/index.html" >
2022-04-02 13:30:16 +00:00
< div id = "body" class = "default-animation" >
< div id = "sidebar-overlay" > < / div >
< div id = "toc-overlay" > < / div >
2022-11-07 19:58:08 +00:00
< nav id = "topbar" class = "highlightable" dir = "ltr" >
2022-04-02 13:30:16 +00:00
< div >
< div id = "breadcrumbs" >
< span id = "sidebar-toggle-span" >
2022-10-08 20:51:04 +00:00
< a href = "#" id = "sidebar-toggle" title = 'Menu (CTRL+ALT+n)' > < i class = "fas fa-bars fa-fw" > < / i > < / a >
2022-04-02 13:30:16 +00:00
< / span >
< ol class = "links" itemscope itemtype = "http://schema.org/BreadcrumbList" >
2022-11-05 23:35:48 +00:00
< li itemscope itemtype = "https://schema.org/ListItem" itemprop = "itemListElement" > < a itemprop = "item" href = "../../../pir/index.html" > < span itemprop = "name" > Cap' n Hugo Relearrrn Theme< / span > < / a > < meta itemprop = "position" content = "1" > > < / li >
< li itemscope itemtype = "https://schema.org/ListItem" itemprop = "itemListElement" > < a itemprop = "item" href = "../../../pir/cont/index.html" > < span itemprop = "name" > Rambl' n< / span > < / a > < meta itemprop = "position" content = "2" > > < / li >
2022-10-02 22:25:49 +00:00
< li itemscope itemtype = "https://schema.org/ListItem" itemprop = "itemListElement" > < span itemprop = "name" > Multilingual an' i18n< / span > < meta itemprop = "position" content = "3" > < / li >
2022-04-02 13:30:16 +00:00
< / ol >
< / div >
< / div >
< / nav >
2022-07-05 22:16:52 +00:00
< main id = "body-inner" class = "highlightable default" tabindex = "-1" >
2022-04-02 13:30:16 +00:00
< div class = "flex-block-wrapper" >
< div id = "head-tags" >
< / div >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "multilingual-an-i18n" > Multilingual an' i18n< / h1 >
2022-04-02 13:30:16 +00:00
2022-07-05 22:16:52 +00:00
2022-05-29 22:03:12 +00:00
< div class = "box notices cstyle warning" >
< div class = "box-label" > < i class = "fa-fw fas fa-skull-crossbones" > < / i > Arrr! Pirrrates< / div >
2022-06-22 22:08:50 +00:00
< div class = "box-content" >
2022-07-02 12:20:53 +00:00
< p > Fello' pirrates, be awarrre < b > some stuff may not work< / b > fer us in this trrranslat'n. Like < b > table of rrramblings< / b > , see'ng < b > Merrrmaids< / b > , do'ng < b > math or chemistrrry< / b > and stuff.< / p > < / div >
2022-04-02 13:30:16 +00:00
< / div >
< p > Th' Relearrrn theme be fully compat'ble wit' Cap'n Hugo multilingual mode.< / p >
< p > It provides:< / p >
< ul >
2022-10-31 14:06:51 +00:00
< li > Translat'n str'ns fer default values (English, Arabic, Simplified Chinese, Traditional Chinese, Dutch, Finnish (Suomi), French, German, Hindi, Indonesian, Italian, Japanese, Korean, Polish, Portuguese, Russian, Spanish, Turkish, Vietnamese). Feel free t' contribute!< / li >
2022-11-01 01:10:49 +00:00
< li > Support fer languages written right t' left< / li >
2022-04-02 13:30:16 +00:00
< li > Automatic menu generat'n from multilingual rrrambl'n< / li >
< li > In-browser language switch'n< / li >
< / ul >
2022-11-05 23:35:48 +00:00
< p >
2022-11-06 15:27:13 +00:00
< a href = "../../../cont/i18n/i18n-menu.gif?classes=shadow&width=300px" data-featherlight = "image" >
< img src = "../../../cont/i18n/i18n-menu.gif?classes=shadow&width=300px" alt = "I18n menu" class = "shadow" style = "height: auto; width: 300px;" loading = "lazy" >
< / a > < / p >
2022-04-02 13:30:16 +00:00
< h2 id = "basic-configuration" > Basic configurat'n< / h2 >
< p > Aft learn'n < a href = "https://gohugo.io/content-management/multilingual" > how Cap'n Hugo handle multilingual websites< / a > , define yer languages 'n yer < code > config.toml< / code > file.< / p >
< p > For example wit' current English an' Piratized English website.< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-toml" data-lang = "toml" > < span class = "line" > < span class = "cl" > < span class = "c" > # English be th' default language< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > defaultContentLanguage< / span > < span class = "p" > =< / span > < span class = "s2" > " en" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [< / span > < span class = "nx" > Languages< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [< / span > < span class = "nx" > Languages< / span > < span class = "p" > .< / span > < span class = "nx" > en< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s2" > " Hugo Relearrrn Theme" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 1< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > languageName< / span > < span class = "p" > =< / span > < span class = "s2" > " English" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [< / span > < span class = "nx" > Languages< / span > < span class = "p" > .< / span > < span class = "nx" > pir< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s2" > " Cap' n Hugo Relearrrn Theme" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 2< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > languageName< / span > < span class = "p" > =< / span > < span class = "s2" > " Arrr! Pirrrates" < / span >
< / span > < / span > < / code > < / pre > < / div > < p > Then, fer each new plank, append th' < em > id< / em > o' th' language t' th' file.< / p >
< ul >
< li > Single file < code > my-page.md< / code > be split 'n two files:
< ul >
< li > 'n English: < code > my-page.md< / code > < / li >
< li > 'n Piratized English: < code > my-page.pir.md< / code > < / li >
< / ul >
< / li >
< li > Single file < code > _index.md< / code > be split 'n two files:
< ul >
< li > 'n English: < code > _index.md< / code > < / li >
< li > 'n Piratized English: < code > _index.pir.md< / code > < / li >
< / ul >
< / li >
< / ul >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle info" >
< div class = "box-label" > < i class = "fa-fw fas fa-info-circle" > < / i > Ahoi< / div >
2022-04-02 13:30:16 +00:00
< div class = "box-content" >
< p > Be aware that only translated planks be displayed 'n menu. It’ s not replaced wit' default language rrrambl'n.< / p >
< / div >
< / div >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle tip" >
< div class = "box-label" > < i class = "fa-fw fas fa-lightbulb" > < / i > Smarrrt Arrrse< / div >
2022-04-02 13:30:16 +00:00
< div class = "box-content" >
2022-07-05 22:16:52 +00:00
< p > Use < a href = "https://gohugo.io/content-management/multilingual/#translate-your-content" > slug< / a > frontmatter parameter t' translate urls too.< / p >
2022-04-02 13:30:16 +00:00
< / div >
< / div >
2022-06-12 17:25:16 +00:00
< h2 id = "search" > Search< / h2 >
< p > In case each page’ s rrrambl'n be written 'n one single language only, th' above configurat'n will already configure th' site’ s search functionality correctly.< / p >
< div class = "box notices cstyle warning" >
< div class = "box-label" > < i class = "fa-fw fas fa-exclamation-triangle" > < / i > Arrr< / div >
< div class = "box-content" >
< p > Although th' theme supports a wide variety o' supported languages, th' site’ s search does not.
You’ ll see error reports 'n yer browsers console log fer each unsupported language. Currently unsupported be:< / p >
< ul >
< li > Indonesian< / li >
< li > Korean< / li >
< li > Polish< / li >
< / ul >
< / div >
< / div >
< h3 id = "search-with-mixed-language-support" > Search wit' mixed language support< / h3 >
2022-10-31 14:06:51 +00:00
< p > In case yer page’ s rrrambl'n contains text 'n multiple languages (e.g. ye be writ'n a Russian documentat'n fer yer english API), ye can add those languages t' yer < code > config.toml< / code > t' broaden search.< / p >
2022-06-12 17:25:16 +00:00
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-toml" data-lang = "toml" > < span class = "line" > < span class = "cl" > < span class = "p" > [< / span > < span class = "nx" > params< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > additionalContentLanguage< / span > < span class = "p" > =< / span > < span class = "p" > [< / span > < span class = "s2" > " en" < / span > < span class = "p" > ]< / span >
< / span > < / span > < / code > < / pre > < / div > < p > As this be an array, ye can add multiple additional languages.< / p >
< div class = "box notices cstyle note" >
< div class = "box-label" > < i class = "fa-fw fas fa-exclamation-circle" > < / i > Avast< / div >
< div class = "box-content" >
2022-10-31 14:06:51 +00:00
< p > Keep 'n mind that th' language code required here, be th' base language code. E.g. if ye have additional rrrambl'n 'n < code > zh-CN< / code > , ye have t' add just < code > zh< / code > t' this parameter.< / p >
2022-06-12 17:25:16 +00:00
< / div >
< / div >
2022-04-02 13:30:16 +00:00
< h2 id = "overwrite-translation-strings" > Overwrite translat'n str'ns< / h2 >
< p > Translat'ns str'ns be used fer common default values used 'n th' theme (< em > Edit< / em > button, < em > Search placeholder< / em > an' so on). Translat'ns be avail'ble 'n English an' Piratized English but ye may use another language or want t' override default values.< / p >
< p > T' override these values, create a new file 'n yer local i18n folder < code > i18n/< idlanguage> .toml< / code > an' inspire yourself from th' theme < code > themes/hugo-theme-relearn/i18n/en.toml< / code > < / p >
< h2 id = "disable-language-switching" > Dis'ble language switch'n< / h2 >
< p > Switch'n th' language 'n th' browser be a great feature, but fer some reasons ye may want t' dis'ble it.< / p >
< p > Just set < code > disableLanguageSwitchingButton=true< / code > 'n yer < code > config.toml< / code > < / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-toml" data-lang = "toml" > < span class = "line" > < span class = "cl" > < span class = "p" > [< / span > < span class = "nx" > params< / span > < span class = "p" > ]< / span >
2022-10-31 14:06:51 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # When us'n multilingual website, dis'ble th' switch language button.< / span >
2022-04-02 13:30:16 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > disableLanguageSwitchingButton< / span > < span class = "p" > =< / span > < span class = "kc" > true< / span >
< / span > < / span > < / code > < / pre > < / div >
< footer class = "footline" >
< / footer >
< / article >
< / div >
< / main >
< / div >
2022-11-17 21:13:11 +00:00
< script src = "../../../js/clipboard.min.js?1668719588" defer > < / script >
< script src = "../../../js/perfect-scrollbar.min.js?1668719588" defer > < / script >
< script src = "../../../js/featherlight.min.js?1668719588" defer > < / script >
< script src = "../../../js/theme.js?1668719588" defer > < / script >
2022-04-02 13:30:16 +00:00
< / body >
< / html >