Search results for

“translate scheme”

6,670 results found

Post

Replies

Boosts

Views

Activity

Localizations. Why I have to export the development language translation?
Hi experts.I am adding internationalization to my project. I am reading Localizing Your App at https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPInternational/LocalizingYourApp/LocalizingYourApp.html.I cannot understand why my first step is to export the development language. My development language is English. When I export it, 'en.xliff' file is created. This is OK. But I cannot import it. It does not contain 'target-language'.To add new language, I just add a language and export it for localizations. When it is translated, I need to import it. That is clear.Can anybody clarify why to export the development language? Maybe I missed something.Regards,Valery.
1
0
276
Dec ’15
iOS 18 Translation API availability for UIKit
After reading the documentation for TranslationSession and other API methods I got an impression that it will not be possible to use the Translation API with UI elements built with UIKit. You don’t instantiate this class directly. Instead, you obtain an instance of it by adding a translationTask(_:action:) or translationTask(source:target:action:) function to the SwiftUI view containing the content you want to translate So the main question I have to the engineers of mentioned framework is will there be any support for UIKit or app developers will have to rewrite their apps in SwiftUI just to be able to use the Translation API?
1
0
2.1k
Jun ’24
Disable auto translation of OpenGL Shaders to Metal
During one of the Metal WWDC presentations, they mentioned that OpenGL shaders will automatically get translated to Metal, no work needs to be done on the developer's end.There's a known bug in iOS 9.x SpriteKit where any shader that uses gl_FragCoord (very common) crashes with a Metal error on Metal compatible devices (it works fine in the simulator or devices that do not support Metal). My question is: Is there any way to stop this auto translation of OpenGL shaders to Metal? A compiler flag or anything to tell the program to never use Metal or translate anything to Metal?
5
0
4.7k
Sep ’15
dig question on IPv6 NAT64 translator
Hi we have a rejected app, possibly due to IPv6 not being well supported in our app. The page never loads and suspect it is DNS related. Its a bug that cannot be replicated in our labs but is always present in the app review lab. our servers are IPv4 and would like to know if this is a potential configuration problem.when I rundig m.espacejeux.com AAAA +nocmd +nostats; <<>> DiG 9.8.3-P1 <<>> m.espacejeux.com AAAA +nocmd +nostats;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43981;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0;; QUESTION SECTION:;m.espacejeux.com. IN AAAA;; ANSWER SECTION:m.espacejeux.com. 7081 IN CNAME m.lp.espacejeux.com.I get a CNAME entry when querying for a AAAA record, will this record make queries go to the NAT64 translator ? or it is absolutely necessary to have 0 records when querying in order to pass through the NAT64 translator ?
1
0
900
Jul ’16
Trouble Translating a Second Word Using TranslationAPI
I’m developing an app to save words that users learn in a language they are studying. Here’s the basic workflow: Type a new word Add the new word Every time a word is added, it gets saved to a list that includes its meaning and the name of the language — useful when saving words in multiple languages Problem: For some reason, the “Add new word” button only works for the first word. The second word is not being added to the list. Here is my code: import SwiftUI import NaturalLanguage import Translation struct ContentView: View { @State private var inputWord: String = @State private var detectedLanguage: String? @State private var translationConfiguration: TranslationSession.Configuration? @StateObject private var viewModel = WordViewModel() var body: some View { VStack(spacing: 24) { // Input field TextField(Type a word in any language, text: $inputWord) .padding() .background(Color(.systemGray6)) .cornerRadius(10) // Button to translate and save Button(Add new word) { translateAndSave() } /
2
0
128
Apr ’25
ManipulationComponent Not Translating using indirect input
When using the new RealityKit Manipulation Component on Entities, indirect input will never translate the entity - no matter what settings are applied. Direct manipulation works as expected for both translation and rotation. Is this intended behaviour? This is different from how indirect manipulation works on Model3D. How else can we get translation from this component? visionOS 26 Beta 2 Build from macOS 26 Beta 2 and Xcode 26 Beta 2 Attached is replicable sample code, I have tried this in other projects with the same results. var body: some View { RealityView { content in // Add the initial RealityKit content if let immersiveContentEntity = try? await Entity(named: MovieFilmReel, in: reelRCPBundle) { ManipulationComponent.configureEntity(immersiveContentEntity, allowedInputTypes: .all, collisionShapes: [ShapeResource.generateBox(width: 0.2, height: 0.2, depth: 0.2)]) immersiveContentEntity.position.y = 1 immersiveContentEntity.position.z = -0.5 var mc = ManipulationComponent() mc.
15
0
1.9k
Jun ’25
How to record voice, auto-transcribe, translate (auto-detect input language), and play back translated audio on same device in iOS Swift?
Hi everyone 👋 I’m building an iOS app in Swift where I want to do the following: Record the user’s voice Transcribe the spoken sentence (speech-to-text) Auto-detect the spoken language Translate it to another language selected by the user (e.g., English → Spanish or Hindi → English) Speak back (text-to-speech) the translated text on the same device Is this possible to record via phone mic and play the transcribe voice into headphone's audio?
0
0
282
Oct ’25
Is there a good way to translate timespec into NSDate
My new EndpointSecurity client code receives event messages of type esmessaget. These contain 3 time values. struct timespec time; uint64_t mach_time; uint64_t deadline; To interpret the deadline I refer to the mach_time. However, when I wish to log/formet/otherwise-consider the wall time where the event was created - I need to translate the timespec into NSDate (hmm... NSTimeInterval?) and I fail to find any documentation or hint about the right way to do so. What I tried so far looks like this: NSDate * timestamp = [NSDate dateWithTimeIntervalSince1970:(double)(message->time.tv_sec) + (double)(message->time.tv_sec) / 1E9 ]; which at least mathematically seems reasonable, but I'm not sure this is the right answer, and I don't know anything about the behaviour of timespec, its origin and accuracy, and whether or not it is consistent. Can anyone shed a little light on the relation between these two time formats? Thanks!
2
0
2.5k
Dec ’20
Google Translator Javascript not working in iOS
I have one web viewer in React Native for my app, and the function of translate with Google works perfectly in the Safari browser, in my Android App, and on the desktop, but not in the iOS app This is my Google Translate code: function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: 'pt', includedLanguages: 'pt,en,es', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL }, 'google_translate_element'); comboTranslate = document.querySelector(#google_translate_element .goog-te-combo); } function changeEvent(el) { if (el.fireEvent) { el.fireEvent('onchange'); } else { // var evObj = document.createEvent(HTMLEvents); var event = new Event('change'); comboTranslate.dispatchEvent(event); // evObj.initEvent(change, false, true); // el.dispatchEvent(evObj); } } function changeLang(lang) { if (comboTranslate) { comboTranslate.value = lang; changeEvent(comboTranslate); } } function clickChange(){ btn_translate = document.querySelectorAll('.language');
3
0
3.0k
Jul ’22
Is there a way to translate touches to screen coordinates
As you can see in the last two lines of the code below, I specify a specific SKSpriteNode to get the correct (or is it, adjusted?) touch coordinates. The last line is just left in there to compare while I am debugging. I was curious if there was already a method in Swift that translates any coordinates handed to it into physical screen coordinates? It would just be easier than having to first find out: Is this item that I am tracking, owned by the main GameScene, or a SKSpriteNode that has been placed somewhere other than 0,0 on the GameScene? override func touchesEnded(_ touches: Set, with event: UIEvent?) { super.touchesEnded(touches , with:event) var delta = CGPoint(x: 0, y: 0) guard touches.first != nil else { return } if let touch = touches.first, let node = myGV.currentGem, node.isMoving == true { let touchLocation = touch.location(in: myGV.guessBar!) let touchLocation2 = touch.location(in: self)
1
0
839
Jun ’21
Cannot submit App with "Default Translation Extension"
We developed a Default Translation App following the guide: https://developer.apple.com/documentation/translationuiprovider/preparing-your-app-to-be-the-default-translation-app. I have already configured everything that needs to be configured according to the document, but there is still this problem
Replies
0
Boosts
0
Views
41
Activity
Apr ’25
Localizations. Why I have to export the development language translation?
Hi experts.I am adding internationalization to my project. I am reading Localizing Your App at https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPInternational/LocalizingYourApp/LocalizingYourApp.html.I cannot understand why my first step is to export the development language. My development language is English. When I export it, 'en.xliff' file is created. This is OK. But I cannot import it. It does not contain 'target-language'.To add new language, I just add a language and export it for localizations. When it is translated, I need to import it. That is clear.Can anybody clarify why to export the development language? Maybe I missed something.Regards,Valery.
Replies
1
Boosts
0
Views
276
Activity
Dec ’15
iOS 18 Translation API availability for UIKit
After reading the documentation for TranslationSession and other API methods I got an impression that it will not be possible to use the Translation API with UI elements built with UIKit. You don’t instantiate this class directly. Instead, you obtain an instance of it by adding a translationTask(_:action:) or translationTask(source:target:action:) function to the SwiftUI view containing the content you want to translate So the main question I have to the engineers of mentioned framework is will there be any support for UIKit or app developers will have to rewrite their apps in SwiftUI just to be able to use the Translation API?
Replies
1
Boosts
0
Views
2.1k
Activity
Jun ’24
Disable auto translation of OpenGL Shaders to Metal
During one of the Metal WWDC presentations, they mentioned that OpenGL shaders will automatically get translated to Metal, no work needs to be done on the developer's end.There's a known bug in iOS 9.x SpriteKit where any shader that uses gl_FragCoord (very common) crashes with a Metal error on Metal compatible devices (it works fine in the simulator or devices that do not support Metal). My question is: Is there any way to stop this auto translation of OpenGL shaders to Metal? A compiler flag or anything to tell the program to never use Metal or translate anything to Metal?
Replies
5
Boosts
0
Views
4.7k
Activity
Sep ’15
dig question on IPv6 NAT64 translator
Hi we have a rejected app, possibly due to IPv6 not being well supported in our app. The page never loads and suspect it is DNS related. Its a bug that cannot be replicated in our labs but is always present in the app review lab. our servers are IPv4 and would like to know if this is a potential configuration problem.when I rundig m.espacejeux.com AAAA +nocmd +nostats; <<>> DiG 9.8.3-P1 <<>> m.espacejeux.com AAAA +nocmd +nostats;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43981;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0;; QUESTION SECTION:;m.espacejeux.com. IN AAAA;; ANSWER SECTION:m.espacejeux.com. 7081 IN CNAME m.lp.espacejeux.com.I get a CNAME entry when querying for a AAAA record, will this record make queries go to the NAT64 translator ? or it is absolutely necessary to have 0 records when querying in order to pass through the NAT64 translator ?
Replies
1
Boosts
0
Views
900
Activity
Jul ’16
Trouble Translating a Second Word Using TranslationAPI
I’m developing an app to save words that users learn in a language they are studying. Here’s the basic workflow: Type a new word Add the new word Every time a word is added, it gets saved to a list that includes its meaning and the name of the language — useful when saving words in multiple languages Problem: For some reason, the “Add new word” button only works for the first word. The second word is not being added to the list. Here is my code: import SwiftUI import NaturalLanguage import Translation struct ContentView: View { @State private var inputWord: String = @State private var detectedLanguage: String? @State private var translationConfiguration: TranslationSession.Configuration? @StateObject private var viewModel = WordViewModel() var body: some View { VStack(spacing: 24) { // Input field TextField(Type a word in any language, text: $inputWord) .padding() .background(Color(.systemGray6)) .cornerRadius(10) // Button to translate and save Button(Add new word) { translateAndSave() } /
Replies
2
Boosts
0
Views
128
Activity
Apr ’25
No translation icon displayed nor option when in view tab
Hi does anyone know how to activate the translation within Safari. Go to web site I do not see the icon for translation, nor when clicking view I don't see translate to English. Thank in advance Lee
Replies
0
Boosts
0
Views
311
Activity
Jul ’20
ManipulationComponent Not Translating using indirect input
When using the new RealityKit Manipulation Component on Entities, indirect input will never translate the entity - no matter what settings are applied. Direct manipulation works as expected for both translation and rotation. Is this intended behaviour? This is different from how indirect manipulation works on Model3D. How else can we get translation from this component? visionOS 26 Beta 2 Build from macOS 26 Beta 2 and Xcode 26 Beta 2 Attached is replicable sample code, I have tried this in other projects with the same results. var body: some View { RealityView { content in // Add the initial RealityKit content if let immersiveContentEntity = try? await Entity(named: MovieFilmReel, in: reelRCPBundle) { ManipulationComponent.configureEntity(immersiveContentEntity, allowedInputTypes: .all, collisionShapes: [ShapeResource.generateBox(width: 0.2, height: 0.2, depth: 0.2)]) immersiveContentEntity.position.y = 1 immersiveContentEntity.position.z = -0.5 var mc = ManipulationComponent() mc.
Replies
15
Boosts
0
Views
1.9k
Activity
Jun ’25
How to record voice, auto-transcribe, translate (auto-detect input language), and play back translated audio on same device in iOS Swift?
Hi everyone 👋 I’m building an iOS app in Swift where I want to do the following: Record the user’s voice Transcribe the spoken sentence (speech-to-text) Auto-detect the spoken language Translate it to another language selected by the user (e.g., English → Spanish or Hindi → English) Speak back (text-to-speech) the translated text on the same device Is this possible to record via phone mic and play the transcribe voice into headphone's audio?
Replies
0
Boosts
0
Views
282
Activity
Oct ’25
CreateML Style transfer - also image to image translation?
Is it also possible to build Paired image to image translation (like pix2pix) with CreateML? Paired = ex B&W to color Unpaired = ex style transfer
Replies
0
Boosts
0
Views
459
Activity
Jun ’20
Is there a good way to translate timespec into NSDate
My new EndpointSecurity client code receives event messages of type esmessaget. These contain 3 time values. struct timespec time; uint64_t mach_time; uint64_t deadline; To interpret the deadline I refer to the mach_time. However, when I wish to log/formet/otherwise-consider the wall time where the event was created - I need to translate the timespec into NSDate (hmm... NSTimeInterval?) and I fail to find any documentation or hint about the right way to do so. What I tried so far looks like this: NSDate * timestamp = [NSDate dateWithTimeIntervalSince1970:(double)(message->time.tv_sec) + (double)(message->time.tv_sec) / 1E9 ]; which at least mathematically seems reasonable, but I'm not sure this is the right answer, and I don't know anything about the behaviour of timespec, its origin and accuracy, and whether or not it is consistent. Can anyone shed a little light on the relation between these two time formats? Thanks!
Replies
2
Boosts
0
Views
2.5k
Activity
Dec ’20
Google Translator Javascript not working in iOS
I have one web viewer in React Native for my app, and the function of translate with Google works perfectly in the Safari browser, in my Android App, and on the desktop, but not in the iOS app This is my Google Translate code: function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: 'pt', includedLanguages: 'pt,en,es', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL }, 'google_translate_element'); comboTranslate = document.querySelector(#google_translate_element .goog-te-combo); } function changeEvent(el) { if (el.fireEvent) { el.fireEvent('onchange'); } else { // var evObj = document.createEvent(HTMLEvents); var event = new Event('change'); comboTranslate.dispatchEvent(event); // evObj.initEvent(change, false, true); // el.dispatchEvent(evObj); } } function changeLang(lang) { if (comboTranslate) { comboTranslate.value = lang; changeEvent(comboTranslate); } } function clickChange(){ btn_translate = document.querySelectorAll('.language');
Replies
3
Boosts
0
Views
3.0k
Activity
Jul ’22
Make the new Translation API available beyond SwiftUI
The Translation API introduced at Session 10117 is impressive, but limiting it to SwiftUI is restrictive. This API works great in the demo, but for more complex apps, it lacks flexibility because it is bound to SwiftUI Views. Please consider making it available in non-SwiftUI environments.
Replies
10
Boosts
0
Views
3.0k
Activity
Jun ’24
iOS 15.0 NSInternalInconsistencyException eason: 'Shouldn't have translate session'
I always get this crash just Monkey test. I don't know that lead to crash. Exception Type: SIGABRT Exception Codes: #0 at 0x1b6ef59c4 Crashed Thread: 0 Application Specific Information: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Shouldn't have translate session'
Replies
1
Boosts
0
Views
1.9k
Activity
Apr ’22
Is there a way to translate touches to screen coordinates
As you can see in the last two lines of the code below, I specify a specific SKSpriteNode to get the correct (or is it, adjusted?) touch coordinates. The last line is just left in there to compare while I am debugging. I was curious if there was already a method in Swift that translates any coordinates handed to it into physical screen coordinates? It would just be easier than having to first find out: Is this item that I am tracking, owned by the main GameScene, or a SKSpriteNode that has been placed somewhere other than 0,0 on the GameScene? override func touchesEnded(_ touches: Set, with event: UIEvent?) { super.touchesEnded(touches , with:event) var delta = CGPoint(x: 0, y: 0) guard touches.first != nil else { return } if let touch = touches.first, let node = myGV.currentGem, node.isMoving == true { let touchLocation = touch.location(in: myGV.guessBar!) let touchLocation2 = touch.location(in: self)
Replies
1
Boosts
0
Views
839
Activity
Jun ’21