Copied to clipboard

Flag this post as spam?

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


  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 23, 2014 @ 20:13
    Jan Skovgaard
    0

    Property editor localization

    Hi guys

    Currently I'm playing around with a property editor and I want to make sure that stuff like labels etc. can be translated to other languages. But I can't seem to find any documentation on how to do it?

    I have tried searching but can't seem to find anything on this.

    Is it possible to do using dictionary items?

    Looking forward to receive some input on this.

    Cheers, Jan

    Post has been edited

  • Marc Stöcker 104 posts 560 karma points c-trib
    Mar 23, 2014 @ 20:25
    Marc Stöcker
    100

    You can use the localize directive in your ng views:

    <localize key="area_key">This is a text</localize>
    

    There is an attribute version as well. Anyways, all that relies on the umbraco language filed, though.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 23, 2014 @ 20:31
    Jan Skovgaard
    0

    Hi Mark

    Thanks for your reply - But this reads from the ui.xml file does right? Seems I was too quick in writing my question since I really want to know if there is anyway to use a dictionary item :)

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 23, 2014 @ 21:18
    Jan Skovgaard
    0

    Hi Mark

    NOW I get it...it works pretty awesomely! :)

    Thanks! #h5yr. I might do a blogpost or something to make it more obvious.

    Cheers, Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 23, 2014 @ 21:33
    Jan Skovgaard
    0

    Marc Goodson gave me a hint on Google+ about this video from December where Niels is demoing another approach. However we're not sure wether or not this has been implemented 100% yet but it looks good https://www.youtube.com/watch?v=LJyaiYfNW6s

    I'm going to give it a try now. If it works it's simply just ACE :)

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 23, 2014 @ 21:55
    Jan Skovgaard
    0

    Ok, does not seem to be working yet but it seems to be a pretty nice way to solve the issue of localizing plugins.

    /Jan

  • Comment author was deleted

    Apr 24, 2014 @ 18:20

    Jan,

    Were you still looking for help with the gmaps repo localization?

    kg

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 24, 2014 @ 18:34
    Jan Skovgaard
    0

    Hi Kevin

    Yeah, still looking - but did not realize that you guys run a build script to assemble everything so it was just now that I gave the archetype package a spin that I saw the fully compiled code...so I think I now have a pretty good idea on what I need to change.

    But I'll keep you posted on that - Going to have another look at the package in about 1-2 hours after I have had my dinner.

    But just 1 thing... The localization stuff you made...it's pure angularjs right? No C# is used in anyway?

    /Jan

  • Comment author was deleted

    Apr 24, 2014 @ 18:48

    Correct, no C# needed for the localization.  It's a simple file grab and key/value lookup.

    I'm on the road today, so responses will be delayed :/

    Ping me with any issues.

    Cheers!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 24, 2014 @ 19:53
    Jan Skovgaard
    0

    Hi Kevin

    Good :) - Actually I got it working now...only challenge is that there are two texts that comes from the Gmaps controller - not the view...

    I'm not sure how I can deal with that? I suppose I could have some hidden elements in the view where I can just update the text and then fetch them by an id...but that seems a bit dirty to me.

    Do you have any input regarding this? I'll do it the "dirty" way but if there is a better way I'll make a new PR.

    Unless HQ decides to implement the stuff Niels is demoing in the video posted...how do you feel about trying encourage package developers to localize their projects this way? And instead of calling the directive and service by package name find a more generic name for it?

    Perhaps we could even add it to the YO scaffolding stuff that Warren created?

    Let me know what you think.

    Cheers, Jan

Please Sign in or register to post replies

Write your reply to:

Draft