Translator - caseInsensitive - Pimcore 6.7.2

Hi,
Updated to Pimcore 6.7.2 and $this->translate() returns string in lowercase in all views.

I Downgraded to Pimcore 6.7.1 and $this->translate() work nice again.

Is this a bug i Pimcore 6.7.2 ?
I could not find anything about it in Upgrade Notes https://pimcore.com/docs/6.x/Development_Documentation/Installation_and_Upgrade/Upgrade_Notes/index.html

Best Regards

@m.aliaa what do you mean by string in lowercase? “keys” or “translated value in lowercase”?

can you please share reproducible case? thanks!

The value from object in lowercase.

Ex reproducible case:

Event DataObject:

En => Rubrik = "Smart choices and decisions"
SV => Rubrik = "Smarta val och beslut"

Controller :

$events = new DataObject\Events\Listing();
$events->load();
$this->view->events = $events;

View:

<?php if ($event->getRubrik()): ?>
    <h1><?php echo $this->translate($event->getRubrik()) ?></h1>
<?php endif ?>

OUTPUT in Pimcore 6.7.2:

En => Rubrik = "smart choices and decisions"
SV => Rubrik = "smarta val och beslut"

smart … (in lowercase) !?

I think I should not use $ this-> translate() in this case because $event->getRubrik() is not a key, but the right value in the right language.
Right?

But it worked fine all the time until I updated to Pimcore 6.7.2 and it may have something to do with this change

!?

I guess, you are trying to fetch localized fields here and for that purpose you don’t need to use translator service. Just call the getter with language or set the locale https://pimcore.com/docs/6.x/Development_Documentation/Objects/Working_with_PHP_API.html#page_Conditions-on-localized-fields

Thank you!
I will update the code in the controllers and views and test Pimcore 6.7.2 egain.

Have a nice day :slight_smile: