Translating a theme, the actual strings

Post Reply
joho
Ssr. Bludit
Posts: 12
Joined: Thu Jun 08, 2023 3:02 pm
Location: Sweden
Has thanked: 3 times
Been thanked: 2 times

Looking at https://docs.bludit.com/en/languages/translate-themes, I can't really get my head around on actually translating strings in a theme. All I can see examples of is how to translate the name/description of a theme.

Looking at some other themes, I see the use of $L->get( 'english_string'), but I don't see $L or $language documented anywhere.

Maybe I'm looking in the wrong place? :|

I put a sv_SE.json file in my theme's [language](url) folder, it looks like this:

Code: Select all

{
    "theme-data":
    {
        "name": "My New Bludit Theme",
        "description": "Plain vanilla Bludit Theme"
    },
    "Browsing content by category" : "Visar innehåll efter kategori",
    "Browsing content by tag" : "Visar innehåll efter etikett",
}
but doing a $L->get( 'Browsing content by category' ) only returns the same string.
User avatar
Edi
Site Admin
Posts: 3131
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 59 times
Been thanked: 81 times
Contact:

There is an error in the language file (, after ""Visar innehåll efter etikett").

It should be:

Code: Select all

{
    "theme-data":
    {
        "name": "My New Bludit Theme",
        "description": "Plain vanilla Bludit Theme"
    },
    "Browsing content by category" : "Visar innehåll efter kategori",
    "Browsing content by tag" : "Visar innehåll efter etikett"
}
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Post Reply