The localization in SfimageEditor with Resx doesn't work in the Version 16.2.0.46

Hi,

I've implemented the localization based on Resx  in the SfImageEditor as described hier https://help.syncfusion.com/xamarin/sfimageeditor/localization. In the version 16.2.0.42 it works in the latest version 16.2.0.46 it doesn't :-( .

Regards 
Marian

8 Replies

MP Michael Prabhu M Syncfusion Team August 21, 2018 02:34 PM UTC

Hi Marian, 
 
Greetings from Syncfusion. 
 
Form our 16.2.0.46 version we have introduced a new feature for localizing the internal texts of our components from PCL/.NET Standard projects. In this approach, when the required culture is not available in the application level, “System.Resources.MissingManifestResourceException” is thrown in debug mode when this particular exception is enabled under exception settings in Visual Studio. To avoid this, we have now added a new property of type ResourceManager to get the resource manager from the user instead of creating it our self. The user needs to maintain the resource files for the required cultures in the application and set this property if localization is needed for the application. 
  • For example,
ChartResourceManager.Manager = new ResourceManager("GettingStarted.Resources.Syncfusion.SfChart.XForms", Application.Current.GetType().GetTypeInfo().Assembly); 
You can refer our release notes on this from the below link. 
Also, we have prepared a sample based on this and the sample can be downloaded from the below link. 
Thanks, 
Michael 
 



MG Marian Grzesik August 23, 2018 03:54 PM UTC

Hi,
it works now! Thanks for help.

Regards
Marian


MG Marian Grzesik August 24, 2018 06:46 AM UTC

Hi,

sorry, I've tested it only on Android and there it works fine. The same App on iOS cause an exception, when I start the SfImageEditor:

he thread 0xe has exited with code 0 (0x0).
Loaded assembly: /private/var/containers/Bundle/Application/CB49C480-4934-4974-8A8A-1A056D3D61AE/Stotax2go.iOS.app/de/Stotax2go.resources.dll [External]
Exception:
System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "Stotax2go.Resources.Syncfusion.SfImageEditor.XForms.resources" was correctly embedded or linked into assembly "Stotax2go" at compile time, or that all the satellite assemblies required are loadable and fully signed.

I started the app in debugger. Strange is the path in the exception:
"Stotax2go.Resources.Syncfusion.SfImageEditor.XForms.resources"
My file is "Stotax2go.Resources.Syncfusion.SfImageEditor.XForms.de.resx"

Thanks 
Marian




AK Ashwin Kumaravel Syncfusion Team August 24, 2018 12:31 PM UTC

Hi Marian,

Can you please ensure the following in your application?

1. Include .resx file as embedded resource
2. Based on this code Stotax2go.Resources.Syncfusion.SfImageEditor.XForms,  ensure whether the file is inside the Resources folder like below screenshot. 

3. Refer the below thread which explains your exact scenario. They suggest to upgrade the Xamarin Studio version. Also confirm us whether it is working in the sample which is attached in our previous update.

https://forums.xamarin.com/discussion/41440/missingmanifestresourceexception-could-not-find-any-resources-appropriate-for-the-specified 

If you still facing the problem, please provide the sample which reproduces the issue.

Regards,
Dhanasekar 



MG Marian Grzesik August 24, 2018 05:49 PM UTC

Hi, 
it works now. I've created the resx file once again, with a short name SfImageEditorLocalization.de.resx.  In debugger I see still one exception FileNotFoundException, but it doesn't have any negative influance. The german translations are now in my iOS and Android app.  The difference in my app in compare to your example is, that I don't use a PCL library, I use .NET Standard 2.0 library. 

Thanks a lot for your help!
Marian

PS. The SfImageEditor is great. One improvement would be a gray transformation :-)


MP Michael Prabhu M Syncfusion Team August 28, 2018 09:23 AM UTC

Hi Marian, 
 
Thanks for your update. 
 
We can able to reproduce the exception when we include exception catch point. We have logged bug report for this and we will include this in our upcoming Volume 3 2018 release which is expected to be released by the end of September 2018. We appreciate your patience until then. 
 
Also, regarding your query “The SfImageEditor is great. One improvement would be a gray transformation  
 
We are considering this as a feature request and added it to our feature request list, while this feature itself is important, we are not able to provide you an exact timeline on when this will be available for now. So, this feature will be available in any one of our upcoming Volume Releases  
 
Thanks, 
Michael 
 
 



MG Marian Grzesik August 31, 2018 03:47 PM UTC

Hi,

the Exception I mentioned in iOS has some bad consequences, I think. In iOS, if I show the page with SfImageEditor and just go back, the whole app crash.When I click on the save button, it works OK. Here ist the Exception I've got:

Thread finished: <Thread Pool> #28
The thread 0x1c has exited with code 0 (0x0).
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
2018-08-30 15:11:32.915 Stotax2go.iOS[11378:7308740] [AppCenterCrashes] ERROR: +[MSWrapperLogger MSWrapperLog:tag:level:]/7 Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
  at Syncfusion.SfImageEditor.iOS.SfImageEditor.Reset () [0x000ba] in <557ac349a8924036921b0f4fbfb09ec2>:0
  at Syncfusion.SfImageEditor.iOS.SfImageEditor.SetImage (UIKit.UIImage im) [0x0000e] in <557ac349a8924036921b0f4fbfb09ec2>:0
  at Syncfusion.SfImageEditor.iOS.SfImageEditor.set_Image (UIKit.UIImage value) [0x00007] in <557ac349a8924036921b0f4fbfb09ec2>:0
  at Syncfusion.SfImageEditor.XForms.iOS.ImageEditorMapping+<setBitmap>d__8.MoveNext () [0x000ca] in <557ac349a8924036921b0f4fbfb09ec2>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.14/src/Xamarin.iOS/mcs/class/referen
cesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018
  at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.14/src/Xamarin.iOS/Foundation/NSAction.cs:178
  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.14/src/Xamarin.iOS/UIKit/UIApplication.cs:79
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.14/src/Xamarin.iOS/UIKit/UIApplication.cs:63
  at Stotax2go.iOS.Application.Main (System.String[] args) [0x00001] in C:\Git\Stotax2go\Stotax2go\Stotax2go\Stotax2go.iOS\Main.cs:17
2018-08-30 15:11:32.947 Stotax2go.iOS[11378:7308740] Unhandled managed exception:
Object reference not set to an instance of an object (System.NullReferenceException)
  at Syncfusion.SfImageEditor.iOS.SfImageEditor.Reset () [0x000ba] in <557ac349a8924036921b0f4fbfb09ec2>:0
  at Syncfusion.SfImageEditor.iOS.SfImageEditor.SetImage (UIKit.UIImage im) [0x0000e] in <557ac349a8924036921b0f4fbfb09ec2>:0
  at Syncfusion.SfImageEditor.iOS.SfImageEditor.set_Image (UIKit.UIImage value) [0x00007] in <557ac349a8924036921b0f4fbfb09ec2>:0
  at Syncfusion.SfImageEditor.XForms.iOS.ImageEditorMapping+<setBitmap>d__8.MoveNext () [0x000ca] in <557ac349a8924036921b0f4fbfb09ec2>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.14/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodB
uilder.cs:1018
  at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.14/src/Xamarin.iOS/Foundation/NSAction.cs:178
  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.14/src/Xamarin.iOS/UIKit/UIApplication.cs:79
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.14/src/Xamarin.iOS/UIKit/UIApplication.cs:63
  at Stotax2go.iOS.Application.Main (System.String[] args) [0x00001] in C:\Git\Stotax2go\Stotax2go\Stotax2go\Stotax2go.iOS\Main.cs:17
The app has been terminated.
Failed to Stop app:  An error occured on client IDB4110756 while executing a reply for topic xvs/idb/4.11.0.756/stop-app
The app has been terminated.

Thanks 
Marian



MP Michael Prabhu M Syncfusion Team September 3, 2018 07:25 AM UTC

Hi Marian, 
 
Sorry for the inconvenience caused, we were able to reproduce this issue at our end and we have logged a defect report on this, the fix for this issue will be available in our upcoming Volume 3 release which is scheduled to be rolled out at the end of September 2018. We appreciate your patience until then. 
 
Thanks, 
Michael 



Loader.
Up arrow icon