Copied to clipboard

Flag this post as spam?

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


  • Adrian 38 posts 117 karma points
    Nov 10, 2014 @ 12:53
    Adrian
    0

    Whats the status on Plugin Localisation?

    I've seen a couple of posts about how some people have done it, hinting at Niels Hartvig video...but I cant seem to find any submissions to Github about its implementation.

    It seem to be a fairly minor change to the getLanguageFile(lang) method of umbraco.businesslogic.ui. Walk the plugin directory for appropriate language files and merge with the returned xml.

    I prepared to do it if no one else is already doing it?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 10, 2014 @ 13:36
    Jan Skovgaard
    0

    Hi Adrian

    There is nothing that works out of the box. However the Archetype project is doing it in a rather ok way, which I have used in some of my own projects as well.

    Have a look here https://github.com/imulus/Archetype/tree/master/app - In the "Langs" folder all the language files are added and inside them are the different dictionary items with key and translation.

    In Directives you'll find the localize directive, which looks like this https://github.com/imulus/Archetype/blob/master/app/directives/localize.js and there's also a localization service, which you can see here https://github.com/imulus/Archetype/tree/master/app/services

    I hope this is enough to get you started - I can't remember where the service is being called but I'll bet you can figure it all out pretty quickly by looking through the source :)

    Hope this helps.

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 10, 2014 @ 13:37
    Jan Skovgaard
    0

    ...But indeeed it would be nice to have it in the core working like the example Niels put up on Youtube last year indeed.

    I'd say go for it! :) Make an issue about it on the issue tracker and then make a pull request for it.

    I think it will make many in the community very happy and bring you lot's of community love and karma :)

    /Jan

  • Adrian 38 posts 117 karma points
    Nov 10, 2014 @ 18:09
    Adrian
    0

    Right I have working code, merges the core language file with developer supplied plugins language file...

    I've raised it as a Feature Request, http://issues.umbraco.org/issue/U4-5777

    What should I do next, just edit the file on github?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 10, 2014 @ 20:19
    Jan Skovgaard
    0

    Hi Adrian

    If it's only a few tweaks then yes otherwise make a fork from https://github.com/umbraco/Umbraco-CMS - no matter the way you do it make sure to update the feature telling that you made PR with the fix :)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft