-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide support for localised resources #85
Comments
Any solution for this bug ? |
@Michenux |
@lolgear thanks a lot, i would prefer the fix to be included in the next release of xcodeproj. Maybe you can create a pull request. |
As far as I know, for now pods need to provide localized files a bundle from which Localizable.strings can be access e.g. via see this pods for example: |
@lolgear would you please share the code for adding localizable resource? I have to add localizable images. Will your code help for this? |
@o15a3d4l11s2, ok, you can try it |
@epologee @Michenux I have successfully add Localizable.strings for additional languages added into the project. I created the script to manage my own project, and you can see it in following this line. You can see the result from my tweet here (with photos). Basically, if you take a look inside
|
Sounds like @haxpor's solution could be part of Xcodeproj? |
Ohh sorry, I just found out that my code is not complete yet. I successfully did that because I added As observed in Ruby doc, I don't see how can I create |
I added new method for creating variant
And loop through the files inside *.lproj folders to add the localisation
|
Was there an update on the issue? Would be great if this feature could find its way to Xcodeproj. |
I guess the ticket is solved since there is a |
@Eldorado234 , I am not sure how to generate localised resources records using |
Sure @o15a3d4l11s2. This is the respective PR in the project I'm working on: jensmeder/Phoenx/pull/31. It boils down to the following: Given the file structure:
You have to create the variant group named parent_group = project.main_group.find_file_by_path('Resources')
variant_group = parent_group.new_variant_group('Localizable.strings') Then you can add the actual translation files: variant_group.new_file('en.lproj/Localizable.strings')
variant_group.new_file('de.lproj/Localizable.strings') |
An example project, created with regular Xcode, contains two localized
Localizable.strings
files:When inspecting the project with
xcodeproj show ...
, it will list localized files like this:The underlying
Localizable.strings
-files are actually in two folders called en.lproj and nl.lproj:When trying to mimic this setup, with the same underlying paths I add them like this:
But the result is different from the way Xcode treats these special cases:
Would you know how to add these files, so Xcode treats them the same way, as when you add them the old-fashioned way?
The text was updated successfully, but these errors were encountered: