concrete5-build icon indicating copy to clipboard operation
concrete5-build copied to clipboard

Guide to use with Concret e5.7

Open legrandjeremy opened this issue 10 years ago • 3 comments

Hi Michele,

I started 2 new web projects with Concrete 5.7 recently. I need to translate the website into French and Italian. I use your concrete5-buil with 'php i8n.php' and it seems to create correctly my pot, po and mo files in each packages.

I try now to change the locale dynamically based on attribute. For example :+1: Concrete\Core\Localization\Localization::changeLocale('fr_FR');

And it seems to change correctly the locale but I can't see my t-strings translated. Do you have any clue to me ?

Many thanks in advance,

legrandjeremy avatar Oct 01 '14 07:10 legrandjeremy

Just a few thoughts that may be obvious, but I'd like to be sure about that:

  • did you filled in the translations in the .po files and compiled them to the .mo format (with POEdit or BetterPOEditor)?
  • do you have the .mo files in the appropriate folders (eg for French it should be 'application/languages/fr_FR/LC_MESSAGES/messages.mo')?
  • did you tried clearing the concrete5 cache?

mlocati avatar Oct 01 '14 08:10 mlocati

  • I filed the PO manually, just one specific string.
  • I compiled the .mo with the 'php i8n.php' command-line :: 'Work on concrete5 package' then I picked my package then 'Compile the language files'
  • I cleared C5 cache.

I would like to use package language files.

It seems not to load my package languages files

legrandjeremy avatar Oct 01 '14 08:10 legrandjeremy

I found that 5.7 had some problems with translations handling. I proposed a fix for this, and Andrew accepted it (for reference: see https://github.com/concrete5/concrete5-5.7.0/pull/1275 ). To use the new code, you should use the version you find in GitHub, or you have to wait the next release of the 5.7 series (that IMHO should happen very soon).

mlocati avatar Oct 08 '14 14:10 mlocati