/// <summary>
        /// Gives an instance of resource bundle.
        /// </summary>
        /// <param name="aName">Name of the bundle you are looking for (ex: CanonMarkernote)</param>
        /// <param name="aCulturalInfo">a cultural info. Can be null</param>
        /// <param name="aType">a type of bundle (See USE_MANAGER or USE_TXTFILE)</param>
        /// <returns>the bundle found or loade.</returns>
        public static IResourceBundle CreateBundle(string aName, CultureInfo aCulturalInfo, int aType)
        {
            string key = aName;

            if (aCulturalInfo != null)
            {
                key += "_" + aCulturalInfo.ToString();
            }
            lock (Locker)
            {
                IResourceBundle resu = null;
                if (!ResourceBundleFactory.BUNDLES.ContainsKey(key))
                {
                    try
                    {
                        if (aType == ResourceBundleFactory.USE_MANAGER)
                        {
                            resu = new ResourceBundleWithManager(aName, aCulturalInfo);
                        }
                        else if (aType == ResourceBundleFactory.USE_TXTFILE)
                        {
                            resu = new ResourceBundle(aName, aCulturalInfo);
                        }
                    }
                    catch (Exception e)
                    {
                        Trace.TraceError("Could not load bundle '" + aName + "' (" + e.Message + ")");
                    }
                    if (resu == null || resu["TEST"] == null)
                    {
                        throw new Exception("Error while loading bundle '" + aName + "' for cultural '" + aCulturalInfo +
                                            "'");
                    }
                    ResourceBundleFactory.BUNDLES.Add(key, resu);
                }
                else
                {
                    resu = ResourceBundleFactory.BUNDLES[key];
                }

                return(resu);
            }
        }
        /// <summary>
        /// Gives an instance of resource bundle.
        /// </summary>
        /// <param name="aName">Name of the bundle you are looking for (ex: CanonMarkernote)</param>
        /// <param name="aCulturalInfo">a cultural info. Can be null</param>
        /// <param name="aType">a type of bundle (See USE_MANAGER or USE_TXTFILE)</param>
        /// <returns>the bundle found or loade.</returns>
        public static IResourceBundle CreateBundle(string aName, CultureInfo aCulturalInfo, int aType)
        {
            string key = aName;
            if (aCulturalInfo != null)
            {
                key += "_" + aCulturalInfo.ToString();
            }

            IResourceBundle resu = null;
            if (!ResourceBundleFactory.BUNDLES.ContainsKey(key))
            {
                try
                {
                    if (aType == ResourceBundleFactory.USE_MANAGER)
                    {
                        resu = new ResourceBundleWithManager(aName, aCulturalInfo);
                    }
                    else if (aType == ResourceBundleFactory.USE_TXTFILE)
                    {
                        resu = new ResourceBundle(aName, aCulturalInfo);
                    }
                }
                catch (Exception e)
                {
                    Trace.TraceError("Could not load bundle '" + aName + "' (" + e.Message + ")");
                }
                if (resu == null || resu["TEST"] == null)
                {
                    throw new Exception("Error while loading bundle '" + aName + "' for cultural '" + aCulturalInfo + "'");
                }
                ResourceBundleFactory.BUNDLES.Add(key, resu);
            }
            else
            {
                resu = ResourceBundleFactory.BUNDLES[key];
            }
            return resu;
        }