Jump to content

Error in TranslationFinder.php


Neema

Recommended Posts

Hi,

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

Link to comment
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...