Ahmed Khedr
Ahmed Khedr

Reputation: 1073

Invalid path when localising iOS app - Xcode 7

I get this popup message when I try to add language in localisation in Xcode 7 - "The file path /Users/.../es.lproj/Main.Strings is invalid The expected prefix is /Users/.../Base.lproj"

I think my project folder is all messed up somehow! Can anyone guide to a way to fix it?

A folder "es.lproj" is added but doesn't appear in Xcode navigation pane and there is no arrow on Main.Storyboard.

Upvotes: 3

Views: 990

Answers (1)

Ahmed Khedr
Ahmed Khedr

Reputation: 1073

OK. Solution was easier than I expected, I was about to start a whole new project!

1) I moved the files in the Base.lproj folder to the main folder of the app, redefined the paths to all these files in 'Identity and Type'.

2) Then in the section called Localisation also in 'Identity and Type', there is a button called 'Localise...'.

3) On clicking this button Xcode creates the folder Base.lproj again. Then selecting Project => Info, clicking + under 'Localisations'.

4) All works fine and multiple languages are added as well as the new files such as 'Localisable.strings' in addition to a disclosure button next to 'Main.storyboard' where beneath that all the localised storyboards. ....

Upvotes: 9

Related Questions