Jump to content

Error in TranslationFinder.php


Recommended Posts


I would like to export my own translation but I get the following error

PHP Warning: strpos(): Empty needle

in the function getDomainFromFile of the file TranslationFinder.php

    private function getDomainFromFile(SplFileInfo $file, $locale)
        $basename = $file->getBasename('.xlf');

        $domain = $basename;
        if (strpos($basename, $locale) === false) {
            $domain .= '.' . $locale;

        return $domain;

I discovered that the problem is that $locale doesn' t contain the language code I used for my language!

How can I fix that?

Thank you in advance

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More