Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I have
NSString *str=#"some unknown value coming from server";
NSString *localizedVersion1 = NSLocalizedString(str, nil);
NSLog(#"localizedVersion1 %#",localizedVersion1);
Getting:
localizedVersion1 some unknown value coming from server .
It's not changing even when I am changing the device language.
You have misunderstood the purpose of NSLocalizedString, it is not a translation service but a lookup one. With this mechanism an app can contain multiple sets of (UI) strings which are selected based on the current language setting. All the strings must exist in advance.
You mention using Google Translate on the web. If you need a translation service then you can use the Google Translate API in your app to provide this. There are other translation services available - just google for them.
HTH
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 days ago.
Improve this question
There is no (0, 0) LatLng. I changed the podfile and info file too.
I created the same API for both. Then I created a specific API for the iOS side and restricted it, again nothing changed. My app sends requests to the Google developers' API but does not show any traffic. I assume there is a problem, however, I could not fix it.
I appreciate your help. Thanks in advance.
This is the Traffic
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I am calling one my private server api on that response i got some special chareter "äÄääuÄuäuöÖöüÜ". But when i try to get in iOS they convert into "äÄääuÄuäuöÖöüÃ"
But in postman got a perfect text "äÄääuÄuäuöÖöüÜ".
Encode the data using .utf8 encoding. By the way how is your api proving the response. You must provide the data as .utf8 encoding from your API side...
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I wanted to use the PopUpButtonPickerStyle for my Picker which i use in a Form, but it just does not exist for me. Any other PickerStyle thats in the Apple documentation works.
Does anyone have an idea what could cause this?
It is clear from the Apple Documentation that PopUpButtonPickerStyle is only available on macOS 10.15+ and not on iOS.
Since you marked your question with the "ios" tag I am assuming you are building iOS app indeed and thus you cannot use it.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
enter image description here
I trying to set Navigationbar gradient colors using CRGradientNavigationBar library.
setBarTintGradientColors is a method, meaning it must take an argument (a list of colors). Therefore, you will need something like this instead of assignment:
CRGradientNavigationBar.appearance().setBarTintGradientColors(colors)
As a rule of thumb, whenever you have set in the name, it is a function, not an attribute, meaning that you will need to pass an argument instead of assign.
https://github.com/chroman/CRGradientNavigationBar
Did you write about this library?
It's old library, it doesn't update about five years. Maybe you should use other libraries?
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a weird requirement where all my data to be displayed in the app is coming from a remote server. The data consists of simple text, numbers, dates and prices. Now, had all this data been static, the task was simple but here the problem is that the data is dynamic (coming from the server) and also the app has to be localised in at least 20 languages. The biggest challenge is to convert the price values into user selected currencies on his device settings on the run.
For currency conversion, you can use the Yahoo API. Examples can be seen in this StackOverflow question.
http://finance.yahoo.com/currency-converter/#from=USD;to=EUR;amt=1
This url format could be used to fetch conversion rates in different formats.
http://download.finance.yahoo.com/d/quotes.csv?s=AUDUSD=X&f=nl1d1t1
Substitute quotes.csv with appropriate format and parameters with the required codes
As far as localization of your text coming from the server, that's a much more difficult problem. I think it would be very difficult to translate this "on the fly". The correct solution is to include the language in the request and have the server return any text in the requested language.
I guess another approach you could take (which may not be feasible depending on how many different strings you are dealing with) is enumerate all the possible strings returned from the server. Then take the more traditional approach of having these strings translated and included in your app.