CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Need help with civicrm.mo file process and location
Pages: [1]

Author Topic: Need help with civicrm.mo file process and location  (Read 3923 times)

hlevinson

  • I post occasionally
  • **
  • Posts: 53
  • Karma: 3
Need help with civicrm.mo file process and location
September 15, 2009, 05:32:02 pm
I am trying to translate CiviCRM (3.0 beta 2) interface strings using the Pootle process.

I started with the en_GB file
Code: [Select]
civicrm-core.po, copied and edited to put in a few of my own strings.

I created a folder

Code: [Select]
/var/www/sites/mysite/modules/civicrm/l10n/en_US_civi
I created the civicrm.mo file with this

Code: [Select]
msgcat *.po | msgfmt -vo civicrm.mo -
and put it in the new folder.

In CiviCRM I went here

Administer -> Configure -> Global Settings -> Localization

But my language was not available.

Am I missing a step in Drupal, CiviCRM, or packing my translation?
Do I need to download/clone/edit ALL the en_GB po files before running msgcat?

I searched the forum and didn't find my solution.

thanks,
Harry

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Need help with civicrm.mo file process and location
September 15, 2009, 11:34:12 pm
Can you clarify a bit what are you trying to accomplish? Do you need a ‘custom English’ translation, or are you trying to translate to some other language?

Quote from: hlevinson on September 15, 2009, 05:32:02 pm
I created a folder

Code: [Select]
/var/www/sites/mysite/modules/civicrm/l10n/en_US_civi

Quote
In CiviCRM I went here

Administer -> Configure -> Global Settings -> Localization

But my language was not available.

The locale (and the directory) needs to be in an xx_YY format, so en_US_civi doesn’t work (‘en_XX’ for a custom English ‘localisation’, for example).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

hlevinson

  • I post occasionally
  • **
  • Posts: 53
  • Karma: 3
Re: Need help with civicrm.mo file process and location
September 16, 2009, 07:13:28 am
Yes, I'm trying to do a custom English-language version. I need to change some text that is used in the interface in CiviCRM, but all the new text will be in American English.

I changed the directory name to "en_US" as you suggested, it didn't change anything inside CiviCRM.

You wrote "locale (and the directory) needs to be in an xx_YY format". Are you suggesting there's a "locale" somewhere that I need to make somewhere? If so, where is that?

hlevinson

  • I post occasionally
  • **
  • Posts: 53
  • Karma: 3
Re: Need help with civicrm.mo file process and location
September 16, 2009, 07:45:43 am
OK, I found one problem with my last change:  obviously "en_US" is the default set in my system.

I changed the folder name to "en_OO" and could now see a new entry in the dropdown lists here

Administer -> Configure -> Global Settings -> Localization


I was able to select my new Default Language. Also, I saw at least one text change in the UI.

However I now see other places that have NOT been updated. Is this because I started with a version 2.x PO file?

Do I need to extract strings myself to create a version 3.0 file? Is someone already doing this and perhaps I should just wait a few days or what?

thanks for the quick response...

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Need help with civicrm.mo file process and location
September 19, 2009, 03:15:53 pm
Quote from: hlevinson on September 16, 2009, 07:45:43 am
OK, I found one problem with my last change:  obviously "en_US" is the default set in my system.

Because most CiviCRM installs are in American English and it’s also the source translation, en_US is short-circuited to skip the translation mechanism altogether.

Quote
I changed the folder name to "en_OO" and could now see a new entry in the dropdown lists here

Administer -> Configure -> Global Settings -> Localization

I was able to select my new Default Language. Also, I saw at least one text change in the UI.

Great, this is how it’s supposed to work. :)

Quote
However I now see other places that have NOT been updated. Is this because I started with a version 2.x PO file?

Can you explain a bit what you mean by this? Do these places have the same string that is translated in the part that works, or some other string that you also translated?

Quote
Do I need to extract strings myself to create a version 3.0 file?

I did that a couple of days ago. You can fetch the v3.0 files from http://svn.civicrm.org/l10n/branches/v3.0/
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

hlevinson

  • I post occasionally
  • **
  • Posts: 53
  • Karma: 3
Re: Need help with civicrm.mo file process and location
September 23, 2009, 07:34:36 am
Sorry for the delay, I didn't have "Notify" set.

I saw some strings that were not converted, but I believe it was my fault. I forgot that I need to add entries for multi-word phrases that include the words I want to translate.

I will check out your new file soon.

Thanks a lot for your help, I think I'm good now.

Harry

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Need help with civicrm.mo file process and location

This forum was archived on 2017-11-26.