Web based family history software

This Help forum is for issues relates to the latest release (1.1.x). For issues related to beta or svn version please use their own Help forum.
When requesting help please provide as much information as possible. Explain what version of webtrees, PHP and MYSQL you are using. If possible provide a URL to your site so we can see the problem first-hand.
Tip: Think about putting these details in your signature, so it appears in the footer of ALL your messages

Question problem with custom_text in WT 1.1

  • otmar.mayr
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
13 years 1 month ago - 13 years 1 month ago #1 by otmar.mayr
problem with custom_text in WT 1.1 was created by otmar.mayr
I can do what I want, but I see only the TAGs: _FARN, ...

How in ReadMe File description I copied the new custom_text directory in the folder \modules. Without success.

Then I coupied custom_text in \modules_V2 and enabled then in the admin "custom_text". That don't work.

If I add following part in admin.php I get an error:

global $FACTS;
$FACTS=i18n::translate('Adoptive name');
$FACTS=i18n::translate('Farm name');
$FACTS=i18n::translate('Formal name');
$FACTS=i18n::translate('Earlier known as');
$FACTS=i18n::translate('Other name');
$FACTS=i18n::translate('Religious name');

require_once WT_ROOT.'includes/classes/class_module.php';

What I have to do, that I can use the new custom_text with the new WT version?

www.verwandten.info / PHP-Version 8.2 / webtrees 2.1.18
Last edit: 13 years 1 month ago by otmar.mayr.

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #2 by fisharebest
Replied by fisharebest on topic Re: problem with custom_text in WT 1.1
<<I copied the new custom_text>>

<<require_once WT_ROOT.'includes/classes/class_module.php';>>

The NEW custom_text module does NOT contain this line.

You have the wrong version of this file?

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • otmar.mayr
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
13 years 1 month ago - 13 years 1 month ago #3 by otmar.mayr
Replied by otmar.mayr on topic Re: problem with custom_text in WT 1.1
No, I did use only this part:

global $FACTS;
$FACTS=i18n::translate('Adoptive name');
$FACTS=i18n::translate('Farm name');
$FACTS=i18n::translate('Formal name');
$FACTS=i18n::translate('Earlier known as');
$FACTS=i18n::translate('Other name');
$FACTS=i18n::translate('Religious name');


If I add this to module.php then I get this error message:

Fatal error: Class 'i18n' not found in /var/www/xxxxxx/html/webtrees/modules_v2/custom_text/module.php on line 33

www.verwandten.info / PHP-Version 8.2 / webtrees 2.1.18
Last edit: 13 years 4 weeks ago by otmar.mayr.

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #4 by fisharebest
Replied by fisharebest on topic Re: problem with custom_text in WT 1.1
There are old (version 1) modules, that are used on webtrees 1.0.0 -> 1.0.6
There are new (version 2) modules, that are used on webtrees 1.1.0 ->

You can download both these from the add-ons area

<<Fatal error: Class 'i18n' not found>>

This error means you are trying to use the OLD version of the module in webtrees 1.1.0. It will not work. Download the NEW version.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • otmar.mayr
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
13 years 1 month ago #5 by otmar.mayr
Replied by otmar.mayr on topic Re: problem with custom_text in WT 1.1
I think I had the newest version. I did download again the file

Custom Text (for webtrees 1.1.0 and above) Version:1.1.0

but without success. I see only the TAGs and not the translation.

What for changes are to make in the file module.php?

www.verwandten.info / PHP-Version 8.2 / webtrees 2.1.18

Please Log in or Create an account to join the conversation.

More
13 years 4 weeks ago #6 by fisharebest
Replied by fisharebest on topic Re: problem with custom_text in WT 1.1
I see it now.

The module in the add-ons area does not have an important update.

Try this.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Attachments:

Please Log in or Create an account to join the conversation.

  • otmar.mayr
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
13 years 4 weeks ago #7 by otmar.mayr
Replied by otmar.mayr on topic Re: problem with custom_text in WT 1.1
Sorry, I had no success with this file.

I don't know whether I must add following part to the module.php:


global $FACTS;
$FACTS=i18n::translate('Adoptive name');
$FACTS=i18n::translate('Farm name');
$FACTS=i18n::translate('Formal name');
$FACTS=i18n::translate('Earlier known as');
$FACTS=i18n::translate('Other name');
$FACTS=i18n::translate('Religious name');


I did it, but after I got this error:

Fatal error: Class 'i18n' not found in /var/www/xxxxxx/html/webtrees/modules_v2/custom_text/module.php on line 33

www.verwandten.info / PHP-Version 8.2 / webtrees 2.1.18

Please Log in or Create an account to join the conversation.

More
13 years 4 weeks ago #8 by fisharebest
Replied by fisharebest on topic Re: problem with custom_text in WT 1.1
I was just looking at the module - not at your code.

Replace

i18n::translate('...');

with

WT_I18N::translate('...');

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
13 years 4 weeks ago #9 by kiwi
Replied by kiwi on topic Re: problem with custom_text in WT 1.1

fisharebest wrote: I see it now.

The module in the add-ons area does not have an important update.

Try this.

I've updated add-ons to use this file.

Please Log in or Create an account to join the conversation.

  • otmar.mayr
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
13 years 4 weeks ago - 13 years 4 weeks ago #10 by otmar.mayr
Replied by otmar.mayr on topic Re: problem with custom_text in WT 1.1
Yes, now I can see the translation in english. The translation in other languages still works not. It's equal whether I use the files de.php or de.mo. I get no result.

Perhaps is something wrong in this .mo or php files?

www.verwandten.info / PHP-Version 8.2 / webtrees 2.1.18
Last edit: 13 years 3 weeks ago by otmar.mayr.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}