Announcement

#1 2020-09-06 07:17:12

clixcity
Member
Miami, FL
2020-08-03
8

Can you change the wording?

Hello,

I'm hoping someone can help me...

I would like to change the wording in my piwigo.

Is it possible to make the word photo(s) changed to artwork instead?

Thanks for your help!

Piwigo URL: https://clix.city/art/

Offline

 

#2 2020-09-06 08:09:22

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7207

Re: Can you change the wording?

Hi :-)

plugin localfileedit

tab language


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#3 2020-09-06 10:23:36

clixcity
Member
Miami, FL
2020-08-03
8

Re: Can you change the wording?

Um... okay...

I installed the plugin LocalFiles Editor and clicked on the language tab but it says:

<?php

/* The file does not exist until some information is entered
below. Once information is entered and saved, the file will be created. */




?>

I don't know what to do with this.

Would inserting echo str_replace("photo","artwork"); work?

Last edited by clixcity (2020-09-06 10:27:03)

Offline

 

#4 2020-09-06 13:35:27

erAck
Only trying to help
2015-09-06
2021

Re: Can you change the wording?

No. If you select the language to translate (e.g. English (GB)) and then on the right click Display reference file: "common.lang.php" a window opens displaying that language file. Search for photo there and copy matching lines to the LocalFiles Editor's text entry and there change the word photo in the translation (only!) to artwork. For example, there's

$lang['%d photo is also linked to current tags'] = "%d photo is also linked to current keywords";

so change that to

$lang['%d photo is also linked to current tags'] = "%d artwork is also linked to current keywords";

Make sure you don't delete the
<?php
?>
from the text entry.


Running Piwigo at https://erack.net/gallery/

Offline

 

#5 2020-09-08 04:21:03

clixcity
Member
Miami, FL
2020-08-03
8

Re: Can you change the wording?

Awesome!!  Thank you so much!  It makes so much more sense now...

That worked!  Almost completely...

Underneath where is says Menu it still says Upload Photos an Edit Photos.

How do I change the menu?

I went through common.lang.php and admin.lang.php but I didn't see anywhere I could change the menu. 

I found the same wording in admin.lang.php but when I changed it the site didn't update.

Maybe there is another area I need to edit?

Offline

 

#6 2020-09-08 07:35:51

Katryne
Member
2016-12-03
368

Re: Can you change the wording?

Hello !
There are also lang files in the plugins. Search among them.


http://photos.katrynou.fr/ v.14.1.0 https://album.chauvigne.info/ v.13.8.0
Système d'exploitation: Linux - Hébergeur 1&1-Ionos PHP: 8.0.28 - MySQL: 5.7.38
Bibliothèque graphique: External ImageMagick 6.9.10-23

Offline

 

#7 2020-09-08 15:28:10

erAck
Only trying to help
2015-09-06
2021

Re: Can you change the wording?

That "Upload Photos" and others are in the admin.lang.php file, guest visitors shouldn't see those, but if you want to change it anyway open also that as reference file in LocalFiles Editor. Also note that there are three English language files, en_US, en_GB and en_UK. You'll have to create translation files for each if you want to serve users with different browser language settings with your changes. In most cases you can just copy entries from one to the other, or if you don't care about GB vs US peculiarities just create a symbolic link on file system level in the local/language/ directory, for example

ln -s en_GB.lang.php en_US.lang.php

You can do that anyway for en_UK because semantically it's the same as en_GB (in fact an en_UK locale does not exist, but..), so

ln -s en_GB.lang.php en_UK.lang.php


Running Piwigo at https://erack.net/gallery/

Offline

 

#8 2020-09-09 05:33:03

clixcity
Member
Miami, FL
2020-08-03
8

Re: Can you change the wording?

I searched the admin.lang.php file for "Upload Photos" which I found and changed, but it doesn't change on the site.

I searched for "Edit photos" which cannot be found but when I search "Edit photo" it can.  I changed that, but again, it doesn't change the logged in menu on the site when I visit..

I did the same as you told me for the admin.lang.php file as I did for the common.lang.php but no changes I make to the admin.php.lang file make any difference on the site after saving changes.

The only language files I have active are the English US (default) and the English UK.  It seems I need English UK to make any changed to the lang files.

I'm stumped.

I would look at the lang files for the plugins but this doesn't really have anything to do with plugins.

Last edited by clixcity (2020-09-09 05:36:33)

Offline

 

#9 2020-09-09 06:07:33

Katryne
Member
2016-12-03
368

Re: Can you change the wording?

Hi !
On my site, in French, I tried to change every occurence of "Photo" into "item", for 10% of the content is PDF.
I meet the same issue with the Discover menu : I keep having "photos" instead of "item" and one of them is not even translated to French : "Edit photos". I made all my modifications via the plugin Local File Editors. What did I miss, I wonder ?


http://photos.katrynou.fr/ v.14.1.0 https://album.chauvigne.info/ v.13.8.0
Système d'exploitation: Linux - Hébergeur 1&1-Ionos PHP: 8.0.28 - MySQL: 5.7.38
Bibliothèque graphique: External ImageMagick 6.9.10-23

Offline

 

#10 2020-09-09 13:37:51

erAck
Only trying to help
2015-09-06
2021

Re: Can you change the wording?

It seems the TakeATour plugin provides an "Edit Photos" string, plugins/TakeATour/language/en_GB/plugin.lang.php. I didn't find anything for "Edit photos" (note case) in my installation. I don't know if translations for plugins are picked up from there, but try to add it to the LocalFiles Editor local/language/fr_FR.lang.php like this

$lang['Edit Photos'] = 'Éditer les photos';
$lang['Edit photos'] = 'Éditer les photos';

or whatever the correct translation would be. You may also have to grep what plugin provides the English string and look into its language files whether it has other identifiers for translatable strings than the English string.

clixcity wrote:

The only language files I have active are the English US (default) and the English UK.  It seems I need English UK to make any changed to the lang files.

I suggest to disable English UK in that case and use English GB instead. ~No browser will request en_UK as it isn't a proper locale, requests will be en_GB or en_US. In case there would be an en_UK request it should fall back to one of those (hopefully en_GB).

Btw, having an en_UK translation at all IMHO is wrong anyway, and that it differs from en_GB for some entries (i.e. has entries that en_GB doesn't) but otherwise is incomplete makes it even worse to find things.


Running Piwigo at https://erack.net/gallery/

Offline

 

#11 2020-09-09 14:42:17

Katryne
Member
2016-12-03
368

Re: Can you change the wording?

TMany thanks, erAck : the provided replacement lang strings enabled the display of the correct words. But I still do not know where it came from, Take a Tour being uninstalled and my having studied all the lang files of my installed plugins.


http://photos.katrynou.fr/ v.14.1.0 https://album.chauvigne.info/ v.13.8.0
Système d'exploitation: Linux - Hébergeur 1&1-Ionos PHP: 8.0.28 - MySQL: 5.7.38
Bibliothèque graphique: External ImageMagick 6.9.10-23

Offline

 

#12 2020-09-25 19:21:51

uncle_errol
Member
2020-09-25
6

Re: Can you change the wording?

Might I have missed a step?

1) I go to Plugins > LocalFiles Editor... tab Languages
2) I select English GB
3) open window from: Display reference file: "common.lang.php"
4) copy the text, replace all the 'photo' occurrences with 'image' on the right side of each relevant argument.
5) paste the new php code into the window under "local/language/en_GB.lang.php" (including closing php thingy '?>')
6) save...
7) repeat for English US and deactivated English_UK

But literally no text on the website has changed. Did I miss something?

Also, where do I save the edited admin.lang.php? In the same window? Won't that massively confuse the system?

Thank for your time.

edit:
ignore me, it actually works! What I didn't realize was that it wants you to exactly translate the phrases in the menu. I was expecting 'Album' to also translate automatically in any phrase that contains album. Thank you this works PERFECTLY!

Last edited by uncle_errol (2020-09-25 21:36:59)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact