Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris 92 posts 238 karma points
    Aug 10, 2015 @ 08:20
    Chris
    0

    Multilingual Blog?

    Hey,

    played around with the SmartBlog now and so far it fits my needs but I have one issue that I can't fix. I want to use the blog in german and english so I added some propertys but can't find a way to edit the .pageFirst or .pageLast content, instead of "first" or "last" I want to add "<<" and ">>".

    Where do I need to modify the code to change the content of the button? This also applies to the text of "There are 1 items on 1 pages." which comes with the partial view "smartlistpost.cshtml".

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Aug 10, 2015 @ 13:40
    Alex Skrypnyk
    1

    Hi Chris,

    What Umbraco version are you using? Do you have visual studio ?

    Why did you decide to use SmartBlog ?

    Thanks, Alex

  • Chris 92 posts 238 karma points
    Aug 11, 2015 @ 07:03
    Chris
    0

    Hey Alex,

    I'm using 7.2.8 and have visual studio although i have little experience with it.

    I have only a little experience with MVC so SmartBlogs gives a really good starting point with it's partial views which work really smooth and still make sense to me. Also it is easy to integrate to a existing umbraco project without much editing.

    Chris

  • Luke Alderton 191 posts 508 karma points
    Aug 11, 2015 @ 10:07
    Luke Alderton
    0

    Hi Chris,

    The paging is handled by the SmartBlog libraries dll, so unfortunately you can't easily edit the text. You should however be able to edit it using JS or perhaps CSS3 depending on what you need to achieve.

    Alternatively, I could provide you with the source code for the paging so that you can have your own custom function.

    Luke

  • Chris 92 posts 238 karma points
    Aug 11, 2015 @ 10:48
    Chris
    0

    Hey Luke,

    would really appreciate if you could give me the source. Tried to change the behaviour of the blog to implement everything with MVC but this will be a lot of work for me.

    Chris

  • FTHOMAS 3 posts 73 karma points
    Sep 28, 2015 @ 12:25
    FTHOMAS
    0

    Hi Chris,

    I have exactly the same problem than you... Did you succeed in having the source code and then recompile SmartBlog according to your langage ?

    Regards, Fred

  • Chris 92 posts 238 karma points
    Sep 28, 2015 @ 12:28
    Chris
    0

    Hey Fred,

    nope I didn't get the source. Is simply build my own site navigation and deleted the one from SmartBlog.

    Regards,

    Chris

  • FTHOMAS 3 posts 73 karma points
    Sep 28, 2015 @ 12:31
    FTHOMAS
    0

    Thank you Chris for your answer... and your advize... I'll certainly do the same! Regards, Fred

  • FTHOMAS 3 posts 73 karma points
    Sep 26, 2015 @ 11:42
    FTHOMAS
    0

    Hi Luke

    I'm facing exactly the same problem than Chris...

    I'm discovering your blog package SmartBlog for umbreco. That's a very good blog engine, not so hard to add to an existing project ! But I have problem with some elements I can't translate... I have'nt find a way to change the words used by the navigation parts : 'First' 'Last' 'There are X items on Y pages'...

    It would be very sad to doesn't use SmartBlog just because those can't be translated...

    Can you please tell me if there is a solution to do that? Is it possible for me to modify and then recompile code ?

    Best regards, Fred

  • Ariel 8 posts 88 karma points
    Oct 15, 2015 @ 18:07
    Ariel
    0

    Hi Fthomas, Chris:

    I found a temporary solution to the blog's translation.

    http://stackoverflow.com/questions/18474497/replace-text-in-a-website

    SmartBlogLayout (Example)
    
    <script>
    
    function replaceTextOnPage(from, to){
        getAllTextNodes().forEach(function(node){
        node.nodeValue = node.nodeValue.replace(new RegExp(quote(from), 'g'), to);
        });
    
        function getAllTextNodes(){
            var result = [];
    
            (function scanSubTree(node){
                if(node.childNodes.length) 
                    for(var i = 0; i < node.childNodes.length; i++) 
                        scanSubTree(node.childNodes[i]);
                else if(node.nodeType == Node.TEXT_NODE) 
                    result.push(node);
            })(document);
    
        return result;
        }
    
        function quote(str){
            return (str+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
        }
    }
    
    </script>
    
    SmartBlogBlog (Example)
    replaceTextOnPage('There are', 'Hay');
    

    I hope this help you

    Regards,

    Ariel

Please Sign in or register to post replies

Write your reply to:

Draft