Search code examples
ioslocalizationlocalizable.strings

File path error while adding localization files to project


I am working an application where i have to localize my app. Previously I was able to select any country(language) while localizing, but now when I try to add any localization file, it gives me popup saying,

The file path /Users/...../hi.lproj/LaunchScreen.strings is invalid. The expected prefix is /Users/..../Base.lproj.

Also, when I add any file to localizaton, it does create a folder in the directory, but .strings file is not shown in Base.lproj folder.

I did tried different solutions provided on the internet for the same problem, but none of them worked for me.


Solution

  • I found an alternate to the above issue. I created a new strings file from the file menu in xcode.

    After creating that file, click on that file and click on 'Localize' button in File inspector tab.

    After that, i tried to add new localization files from target to my app. It did gave me a file path error, but ignore it. You will be able to localize your string.