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) »
  • en_US?
Pages: [1]

Author Topic: en_US?  (Read 5700 times)

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
en_US?
March 24, 2008, 08:06:20 pm
I'm sure the answer to this question is incredibly obvious, but at the moment it escapes me.

I want to make some customizations to the default en_US language settings. I haven't really messed with the default settings before, but if I understand correctly, the default en_US settings are not handled through separate language files, but are integrated directly into the code. Any other language files used override the default setting (which becomes the "id") with the translated string.

I would think it would be desirable to do the same thing with separate en_US .po files if you want to override the defaults, rather than make changes in the code and compromise the ease of future updates. However, I don't see a set of US English files on the pootle site. Am I missing something? Or is there a better way to go about this?
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
en_LC?
March 25, 2008, 01:03:50 am
Why don't you create a new language, that contains only your "translations" ? By default, it keeps the en_US, and only add your changes.

I did it with en_UK and added a couple of customisation. Works fine.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Michał Mach

  • Moderator
  • Ask me questions
  • *****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: en_US?
March 25, 2008, 04:50:49 am
en_US is not handled by translation mechanism at all - all the strings are displayed as they are put in templates/classes. I guess that most handy option would be to add new language in your local install and use it to introduce your customisations.

"The right thing" kind of solution would be to create custom templates and introduce your changes there, but that will be difficult to maintain if you have a lot of changes, and will not allow you to change strings which are contained in classes.

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: en_US?
March 25, 2008, 08:59:39 am
Many of my changes are in templates, but there's a few strings contained in classes that I was trying to avoid making edits to. I'll go ahead and just make my own translation. I was hoping for an en_US set to use as a starting point, but that's alright.
Thanks,
Brian
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

jamie

  • I post occasionally
  • **
  • Posts: 95
  • Karma: 6
Re: en_US?
October 14, 2008, 11:02:44 am
I have the same goals.

I just went through the following steps without luck. Any suggestions?

I tried downloading the plain text .po file from the translation site (http://translations.civicrm.org/), but couldn't figure out how to do it (maybe if I was registered?).

Instead I checked out the code from svn with:

Code: [Select]
svn checkout http://svn.civicrm.org/civicrm/trunk civicrm

I then switched to the branch I have installed:

Code: [Select]
svn switch http://svn.civicrm.org/civicrm/branches/v2.0

I then I found the civicrm/l10n/en_GB/LC_MESSAGES directory.

I then searched for the string I wanted:

Code: [Select]
grep -i "record offline contribution" *

This told me that my string was in the civicrm-core.po file.

I copied this file to a newly created civicrm/l10n/en_XX/LC_MESSAGES directory and I deleted all the strings in the file except the one I wanted to change. In the end my file contained the following:

Code: [Select]
# Copyright CiviCRM LLC (c) 2004-2007
# This file is distributed under the same license as the CiviCRM package.
# If you contribute heavily to a translation and deem your work copyrightable,
# make sure you license it to CiviCRM LLC under Academic Free License 3.0.
msgid ""
msgstr ""
"Project-Id-Version: CiviCRM 2.0\n"
"POT-Creation-Date: 2008-07-07 18:43-0700\n"
"PO-Revision-Date: 2007-08-04 20:03-0700\n"
"Last-Translator: Dave McLachlan <dave@macs.id.au>\n"
"Language-Team: CiviCRM Translators <civicrm-translators@lists.civicrm.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n == 1 ? 0 : 1);\n"
"X-Generator: Pootle 1.0.1\n"

#: templates/CRM/Contact/Page/View/Contribution.tpl
msgid "Record Offline Contribution"
msgstr "Record Contribution"

Next, I created a .mo file with:

Code: [Select]
msgfmt civicrm-core.po -o civicrm-core.mo

Finally, I went to Administer -> Global Settings and selected en_XX as my localization.

Unfortunately - the change doesn't seem to have worked. When I view the contributions page I get the same string.

Any suggestions?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • en_US?

This forum was archived on 2017-11-26.