#1 Going all Multilanguage / i18n
Error Showing Content - please login as admin for details.
Multi-Language (i18n) Resources
⬇️ Result | Source ➡️
- The Greeting Text:
Welcome to the Tutorial App!
This is the English greeting 😉!
-
A button:
@inherits Custom.Hybrid.Razor14
<ol>
<li>The Greeting Text: <br>
@Html.Raw(App.Resources.Get("Greeting"))
</li>
<li>
A button:
<button type="button">@App.Resources.Get("ButtonOrder")</button>
</li>
</ol>
Multi-Language (i18n) Content
The editor can edit anything and choose which field to translate. In the following example, only one book is translated - and even the cover-image is translated.
⬇️ Result | Source ➡️
-
Hitchhikers Guide to the Galaxy
Seconds before the Earth is demolished to make way for a galactic freeway, Arthur Dent is plucked…
-
Good Omens
The Nice and Accurate Prophecies of Agnes Nutter, Witch is a World Fantasy Award-nominated novel…
-
Phishing for Phools
Markets are full of manipulative traps, and we can all be easily coerced into spending money to our…
-
The Last Continent
Ane awesome parody of Australians.
@inherits Custom.Hybrid.Razor14
@using ToSic.Razor.Blade
@{
// Resize settings for the cover images
var flatSettings = Kit.Image.Settings(width: 100, height: 300, resizeMode: "max", scaleMode: "both");
}
<ul>
@foreach (var book in AsList(App.Data["Books"])) {
<li class="mb-4">
<div style="overflow: auto">
@if (Text.Has(book.Cover)) {
@Kit.Image.Img(book.Cover, settings: flatSettings, imgClass: "float-start pe-4")
}
<strong>@book.Title</strong> <br>
@Text.Ellipsis(book.Teaser, 100, suffix: "…")
</div>
</li>
}
</ul>
#1 Going all Multilanguage / i18n