Copied to clipboard

Flag this post as spam?

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


  • Marc Ferrold 24 posts 105 karma points
    Jul 10, 2015 @ 08:33
    Marc Ferrold
    0

    Translating and Localization (To Danish)

    Hi, hey, hello

    I'm working on a Danish site using Merchello, and I've noticed a few bits seem to be missing a translation, when a user's language is changed. Missing translations

    How would I go about translating things such as these, if possible? I've gone through the da.xml file and translated all I could.

    Also, when I set the language to anything other than EN UK, Merchello appears as [merchello] (yellow highlight). This also happens on the "root" of Merchello in the section name. Merchello "root"

    Translations seem to be missing in various other places as well and it would be a neat little touch for an eventual end user, if I could fix these :)

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jul 10, 2015 @ 16:51
    Rusty Swayne
    1

    Thanks Marc and your correct I've been pecking at them as I get back into the various pages.

    The localization is tricky to keep up with (especially on upgrades) as at this point the Merchello language files have to be merged with Umbraco's that are stored in /Umbraco/Config/Lang. Also, I typically just add new keys in the en.xml file and have a script that is supposed to check and merge for me and it may need to be tweaked a bit =|

    Help on the localization would be awesome. The localization is done (in most cases) using Umbraco's localize directive - so in the respective angular views you would replace any hard coded text with the directive

      <localize key="merchello[AreaAlias]_[keyAlias" />
    

    ex.

    If we wanted to use the term "Price" we might do

     <localize key="merchelloGeneral_price" />
    

    to match the values in the lang file:

     <area alias="merchelloGeneral">
         <key alias="apply">Apply</key>
         <key alias="price">Price</key>
         ....
    

    TBH, I think the language files are a mess and really want to to find time to reorganize them - too many cooks in the kitchen and we did not think to outline things upfront. In short, if something does not exist, just add them where you think they make sense without worry. If a term does exist but is in an area that does not make sense to you, just use it anyway as it will eventually get reorganized.

    A couple of things to note:

    You will need to modify the files in the Merchello.Web.Ui.Client project:

    1. /src/config/lang/
    2. /src/views/ ...

    so your work does not get overwritten with a grunt build.

    The Tabs (like the Product Listing) will need to be done a bit differently as they are generated in a factory. I've added a task to do this http://issues.merchello.com/youtrack/issue/M-747

    The Tree itself already has an issue http://issues.merchello.com/youtrack/issue/M-732 and I'll look at that at the same time.

  • Marc Ferrold 24 posts 105 karma points
    Jul 13, 2015 @ 07:20
    Marc Ferrold
    0

    Cool, thank you very much for the response, I can definately work with this :)

    I'm having a bit of trouble getting translations to stick, however. For example, I've added

    <key alias="shippable">Fragtvare</key>
    

    (Tried in both Merchello/config/lang/da.xml and umbraco/Config/Lang/da.xml)

    Along with

    <localize key="merchelloVariant_shippable" />
    

    In productlist.html

    But it only displays as [merchelloVariant_shippable].

    I'm not very familiar with editing source code, and I've frankly only ever heard grunt/gulp/bower mentioned, I've never actually used any of them (only just out of school) nor do I have a proper mental grasp of what they're supposed to do, so that might be a problem :) I'd gladly help with translations though.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jul 13, 2015 @ 15:16
    Rusty Swayne
    100

    Hi Marc - no worries at all. I'm no expert with Grunt either and have never used gulp =)

    Grunt does is run a bunch of individual tasks using Node. In our case , you can think of it as a shell script in the Node to a group and concatenate a bunch of like files together, do some checks, compile the SASS files into .css and copy the final versions from Merchello.Web.Ui.Client to Merchello.Web.Ui.

    If you are interested in trying to give it a go, checkout the Readme.md file in Merchello.Web.Ui.Client. Once you have Node and Ruby installed locally, open the Node command prompt and navigate to the Merchello.Web.Ui.Client directory and execute the npm install commands.

    Once you have it setup, you will be able to edit everything in the Merchello.Web.Ui.Client project, run "grunt build" in the command prompt and view your changes in the Merchello.Web.Ui (Bazaar) site - with the exception of the language files which still need to be merged into the directory you are currently editing.

    I should have mentioned Umbraco caches the language files, so when you are editing language them, add a space somewhere in your web.config file and hit save. You should see the change then.

  • Marc Ferrold 24 posts 105 karma points
    Jul 14, 2015 @ 05:51
    Marc Ferrold
    0

    Thank you, very cool, I'll do a bit of shall we say "direct" translating for my current project and then have a poke at Merchello.Web.Ui.Client - see what I can come up with :)

    At the very least this should work for getting this project done :)

    Again, thank you very much for the help!

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    Sep 29, 2015 @ 09:37
    Biagio Paruolo
    0

    Hi,

    and for the forefront pages and form? Do I need to translate ( but not dinamic ) error messages and labels into Bazaar Models?

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Sep 29, 2015 @ 16:12
    Rusty Swayne
    0

    @Biagio - unfortunately yes at the moment. It's on my radar and I know those need some attention. There is a side project in the works to build a new example site which I may convert into another starter kit ...

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    Sep 29, 2015 @ 16:58
    Biagio Paruolo
    1

    I think that could help on this mvc internationalization...

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Sep 29, 2015 @ 17:03
    Rusty Swayne
    0

    @Biagio - that would be awesome. I'll keep you posted when we get some traction on the project.

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    Sep 29, 2015 @ 17:09
    Biagio Paruolo
    0

    I'll give a try because I need to translate modelview bazaar forms to italian. I've to open the site in this week. Meanwhile l've coded the labels.

Please Sign in or register to post replies

Write your reply to:

Draft