Why lower text? #1714

Closed
opened 2026-10-05 00:53:52 +02:00 by adam · 3 comments
Owner

https://github.com/Piwigo/Piwigo/blob/4ac772224f25f1b2f3bf94bd1f9c45b653d561f5/include/functions_html.inc.php#L614

While this funtion with strtolower may have rights for some languages, it makes no sense for a language like German.
Maybe also other languages will write the first letter uppercase, there should be a (config) setting to avoid such behaviour.

That is also valid for the line 618 below.

https://github.com/Piwigo/Piwigo/blob/4ac772224f25f1b2f3bf94bd1f9c45b653d561f5/include/functions_html.inc.php#L614 While this funtion with strtolower may have rights for some languages, it makes no sense for a language like German. Maybe also other languages will write the first letter uppercase, there should be a (config) setting to avoid such behaviour. That is also valid for the line 618 below. <!-- github-sync-id:1858127331 -->
adam closed this issue 2026-10-05 00:53:52 +02:00
Author
Owner

I think the idea was to avoid having the word "visits" translated twice. One for %d visits and another one as title Visits. But you're absolutely right, changing the case may result in a grammatical error, depending on language.

I fixed it.

I think the idea was to avoid having the word "visits" translated twice. One for `%d visits` and another one as title `Visits`. But you're absolutely right, changing the case may result in a grammatical error, depending on language. I fixed it. <!-- github-comment-id:1686472743 -->
Author
Owner

Thx for thinking about that.
I understand that it may be fine for some languages.

So, why not adding another config setting vor such?
e.g. in config_default.inc.php > $conf['lower_upper'] = true; // or false .. which one is preferred as default

And inside the language file(s) a value which will override the confg value.
OR, only inside the language files common.lang.php and (if exists) plugin.lang.php a simple $lang['_lower'] = true; // false
(the _ indicates here that it is not a translateable value ..

Therefore both cases can be true (when needed).

Thx for thinking about that. I understand that it may be fine for some languages. So, why not adding another config setting vor such? e.g. in config_default.inc.php > **$conf['lower_upper'] = true; // or false .. which one is preferred as default** And inside the language file(s) a value which will override the confg value. OR, only inside the language files common.lang.php and (if exists) plugin.lang.php a simple **$lang['_lower'] = true; // false** (the _ indicates here that it is not a translateable value .. Therefore both cases can be true (when needed). <!-- github-comment-id:1689609800 -->
Author
Owner

from the moment we have a specific language string required for one language, the is no need to lower/upper anything :-)

from the moment we have a specific language string required for one language, the is no need to lower/upper anything :-) <!-- github-comment-id:1689625668 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1714