Hello,
Context:
I have several chronoforms and listings (around 20 pages). All use locales. To secure the translation, I built a table in Excel sheet a list of words and sentences to be translated as a translation dictionary. Each time I made a modification in this excel sheet, I just copy the the translation from my excel sheet dictionary to CV5 and CCV5 locales tabs.
As I have 20 pages to update, it is more interesting to centralize locales in one common file.
Question:
How to do that, or is it a solution for that to make my operations more simple?
Thanks
Bertrand
Context:
I have several chronoforms and listings (around 20 pages). All use locales. To secure the translation, I built a table in Excel sheet a list of words and sentences to be translated as a translation dictionary. Each time I made a modification in this excel sheet, I just copy the the translation from my excel sheet dictionary to CV5 and CCV5 locales tabs.
As I have 20 pages to update, it is more interesting to centralize locales in one common file.
Question:
How to do that, or is it a solution for that to make my operations more simple?
Thanks
Bertrand
Hi Bertrand,
The answer is No - unless you hack the ChronoForms files. I just tested and this appears to work. Edit the file /components/com_chronoforms5/chronoforms/libs/form.php around line 169 like this
And then add code like this in the locales tabs
Bob
The answer is No - unless you hack the ChronoForms files. I just tested and this appears to work. Edit the file /components/com_chronoforms5/chronoforms/libs/form.php around line 169 like this
if($tag_cap == $site_lang){
/* Start hack */
ob_start();
eval('?>'.$lang_data['strings']);
$lang_data['strings'] = ob_get_clean();
/* end hack */
$lines = explode("\n", $lang_data['strings']);
$strings = array_map($_f, $lines);
And then add code like this in the locales tabs
<?php
include (JPATH_SITE.'/components/com_chronoforms5/includes/'.$this->form['Form']['title'].'/lang_en-gb.txt');
?>
and add your language strings in text files in the file shown there. In this case the path uses the form name but you can use another location if you want to use the same file in multiple forms.
Bob
Hello Bob,
Thank for your help.
I did not get the notification of Chronoengine messages since several months. Curious.
I just come back from vacation. I made a test this morning by following your advice.
I think I missed something.Please look at my 2 attached files.
Bertrand
Thank for your help.
I did not get the notification of Chronoengine messages since several months. Curious.
I just come back from vacation. I made a test this morning by following your advice.
I think I missed something.Please look at my 2 attached files.
Bertrand
Hi Bertrand,
Please remove the $form->form['Form']['title'] part from the form path as you aren’t using a sub-folder with the form name.
Bob
Please remove the $form->form['Form']['title'] part from the form path as you aren’t using a sub-folder with the form name.
Bob
Hello Bob,
Thanx, that works fine. Last question: Where can I make this modification for Chronoconnectivity?
Bertrand
Thanx, that works fine. Last question: Where can I make this modification for Chronoconnectivity?
Bertrand
Hi Bertrand,
I don't know :-( Have you tried using the same code in the Language Strings box? It will depend whether Max has that set up to be evaluated as PHP or not.
Bob
I don't know :-( Have you tried using the same code in the Language Strings box? It will depend whether Max has that set up to be evaluated as PHP or not.
Bob
Hello Bob,
Yes I did try. It was the first thing I did. In fact, in my first mail, I did it with CCV5 with an error on the include path, as you informed.
I tried with CFV5 with the correction on the path, that works.
I will write to Max if he could give me a help.
Thanks Bob
Bertrand
Yes I did try. It was the first thing I did. In fact, in my first mail, I did it with CCV5 with an error on the include path, as you informed.
I tried with CFV5 with the correction on the path, that works.
I will write to Max if he could give me a help.
Thanks Bob
Bertrand
Hello Max,
Did you receive my question submitted from "Contact Us" form?
Let me know if I had a chance to centralize locales files in Chronoconectivity.
I still have 10 pages times 3 languages to be changed if I needed to change some translations.
Thanks,
Bertrand
Did you receive my question submitted from "Contact Us" form?
Let me know if I had a chance to centralize locales files in Chronoconectivity.
I still have 10 pages times 3 languages to be changed if I needed to change some translations.
Thanks,
Bertrand
Hi,
Same hack for connectivity, file:
line 247:
after it, just use the same lines provided by Bob above:
Best regards,
Max
Same hack for connectivity, file:
\administrator\components\com_chronoconnectivity5\chronoconnectivity\helpers\lister.php
line 247:
if($tag_cap == $site_lang){
after it, just use the same lines provided by Bob above:
ob_start();
eval('?>'.$lang_data['strings']);
$lang_data['strings'] = ob_get_clean();
Best regards,
Max
Hello Max,
Thanks for this help. I will test this hack and let you know soon.
Bertrand
Thanks for this help. I will test this hack and let you know soon.
Bertrand
Hello Bob and Max,
Both hacks work fine for CFv5 and CCv5. This is an added value that saved me 2 hours of workload for each modification because I have 12 CFv5 and 12 CCv5 times 3 languages. (24 x 3 locales).
This has to be included in the next versions.
Thanks
Bertrand
Both hacks work fine for CFv5 and CCv5. This is an added value that saved me 2 hours of workload for each modification because I have 12 CFv5 and 12 CCv5 times 3 languages. (24 x 3 locales).
This has to be included in the next versions.
Thanks
Bertrand
Hello Bob, Hello Max
I tried to update:
ChronoForms5 to version 5.0.14 from 5.0.12
ChronoConnectivity5 to version 5.0.6 from 5.0.4
and make the necessay modification for
Chronoform --> /components/com_chronoforms5/chronoforms/libs/form.php
and
ChonoConnectiity --> /administrator/components/com_chronoconnectivity5/chronoconnectivity/helpers/lister.php
I got this error message when displaying the forms and listings:
I had the include file in language string:
<?php
include (JPATH_SITE.'/custom/includes/lang_en-gb.txt');
?>
Do you have an idea why?
Thanks
Bertrand
I tried to update:
ChronoForms5 to version 5.0.14 from 5.0.12
ChronoConnectivity5 to version 5.0.6 from 5.0.4
and make the necessay modification for
Chronoform --> /components/com_chronoforms5/chronoforms/libs/form.php
and
ChonoConnectiity --> /administrator/components/com_chronoconnectivity5/chronoconnectivity/helpers/lister.php
I got this error message when displaying the forms and listings:
0 - syntax error, unexpected ' ' (T_STRING)
I had the include file in language string:
<?php
include (JPATH_SITE.'/custom/includes/lang_en-gb.txt');
?>
Do you have an idea why?
Thanks
Bertrand
Hi Bertrand,
Does it go away when you remove the code below:
?
Best regards,
Max
Does it go away when you remove the code below:
<?php
include (JPATH_SITE.'/custom/includes/lang_en-gb.txt');
?>
?
Best regards,
Max
This topic is locked and no more replies can be posted.