This project is read-only.

localization translation issue

Topics: Localization, Troubleshooting
Nov 28, 2011 at 5:46 AM

I'm new to the Orchard, I'm trying to understand how localization works in Orchard.  I downloaded French .po zip file and installed it following steps listed in  when I change default culture from dashboard|settings|General, it works fine.  

But, after I changed a .PO file, say orchard.module.po under Modules\Orchard.Blogs\App_Data\Localization\fr-FR folder, when I switch culture from dashboard|settings|General, I don't see my changes.  any idea?

Nov 28, 2011 at 10:20 AM

Not sure if that's the issue but it seem that if you install a new translation, Orchard will only pick it up if you add the corresponding culture after the translation. So this works:

  1. Install French translation.
  2. Add French culture.
  3. Switch to French culture.

But this does nothing:

  1. Add French culture.
  2. Install French translation.
  3. Switch to French culture.
Nov 28, 2011 at 5:11 PM

@Piedone, thanks for your info.

I followed the first three steps as you mentioned, which should work.  I tried to use Culture Picker, it looks working fine.  but what I really want to find out is that how to use .PO file to drive rendering page/content in different culture.  I know Orchard uses function T("msgId"), which will look for translation for proper culture in an .PO file.  is there any hands-on tutorial about this matter?

Nov 28, 2011 at 6:47 PM

Ah, then I've misunderstood the question. I don't know of any tutorial besides what is in the docs, but the whole thing is pretty simple so the documentation should cover that. Just wrap all your strings that you intend to show in T(), then look at the Translation Manager feature's (formerly an independent module, now part of Vandelay Industries) command line commands. These among others help to extract translatable strings, i.e. it produces the po files for you, you only have to translate the strings (and rename the files's location to reflect their culture).

What is it specifically you're unsure about?