Skip to content
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

Localization #21

Closed
staticdreams opened this issue Jul 29, 2015 · 8 comments
Closed

Localization #21

staticdreams opened this issue Jul 29, 2015 · 8 comments

Comments

@staticdreams
Copy link

Hey @jcavar ! Great module.
I noticed there are NSLocalizedString's inside your pod. But any idea how can I pull them inside my project for translation?

@jcavar
Copy link
Owner

jcavar commented Jul 29, 2015

Hi @staticdreams,
Have you tried to add strings file and add translations you need?

@staticdreams
Copy link
Author

@jcavar I'm not sure how to do that manually.. With my all other translations Xcode just "picks" them up since they are inside the project and generates translations files which I can then use. But Pods are stored inside the workspace, but outside the project.. Any tips on how to add translations manually from the pod?

@jcavar
Copy link
Owner

jcavar commented Aug 1, 2015

I am not sure that I understand your question. You should just add translation for Refresher strings in your strings file. Here is example project how to do it.
https://www.dropbox.com/s/sffn7cm5p846tcd/TestRefresher.zip?dl=0

@staticdreams
Copy link
Author

@jcavar that's exactly what I needed! Thank you!

@jcavar
Copy link
Owner

jcavar commented Aug 1, 2015

Great. You are welcome

@artworkad
Copy link

@jcavar this is not working for me. The strings are not overwritten. Can you simply make the text fields public or create methods to set text values? There are apps that don't use localization.

The strings are hardcoded in your code:

func pullToRefresh(view: PullToRefreshView, stateDidChange state: PullToRefreshViewState) {
    switch state {
    case .Loading:
        animatorView.titleLabel.text = "Loading"
    case .PullToRefresh:
        animatorView.titleLabel.text = "Pull to refresh"
    case .ReleaseToRefresh:
        animatorView.titleLabel.text = "Release to refresh"
    }
}

@artworkad
Copy link

I managed to solve my problem by implementing my own custom animator.

@jcavar
Copy link
Owner

jcavar commented Aug 5, 2015

@artworkad great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants