public static string GetStringResource(string key, string defaultValue)
        {
            // set current thread's culture
            Thread.CurrentThread.CurrentUICulture = AppInfo.GetAppInfo().OsContext.CurrentCulture;



            // get resource manager
            if (embeddedResourceManager == null)
            {
                lock (embeddedResourceManagerLock) {
                    if (embeddedResourceManager == null)
                    {
                        string baseResourceName = "Address_CS" + "Language";
                        embeddedResourceManager = new EmbeddedResourceManager(
                            baseResourceName,
                            Assembly.GetExecutingAssembly(),
                            delegate(Exception exception, int retries, string k) {
                            SmartErrorLog.LogError(exception, new StackTrace().ToString(), k, retries);
                        });
                    }
                }
            }

            // get resource
            return(embeddedResourceManager.GetString(key) ?? defaultValue);
        }
 public static void LogError(Exception e, string stackTrace, string key, int retries)
 {
     if (singleton == null)
     {
         singleton = new SmartErrorLog();
     }
     singleton.Log(e, stackTrace, key, retries);
 }