mirror of
https://github.com/HackPlan/i18next-ios.git
synced 2026-01-12 22:48:02 +08:00
Loading resource file from main bundle
This workaround the issue where file are not file, because their are in a different bundle when using frameworks.
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
for (id l in langs) {
|
||||
if ([l isKindOfClass:[NSString class]]) {
|
||||
NSString* lang = l;
|
||||
NSString* path = [[NSBundle bundleForClass:[self class]] pathForResource:lang ofType:@"lproj"];
|
||||
NSString* path = [[NSBundle mainBundle] pathForResource:lang ofType:@"lproj"];
|
||||
NSString* langFile = [path stringByAppendingPathComponent:filename];
|
||||
if (langFile) {
|
||||
[langsToRead addObject:lang];
|
||||
|
||||
Reference in New Issue
Block a user