Beispiel #1
0
 public static string KNLocalizedStringWithDefaultValue(string key, string tableName, KNBundle bundle, string value, string comment)
 {
     return bundle.LocalizedStringForKeyValueTable(key, value, tableName);
 }
Beispiel #2
0
        public static KNBundle BundleWithDirectoryPath(string path)
        {
            KNBundle bundle;

            if (bundleCache.ContainsKey(path)) {
                if (bundleCache.TryGetValue(path, out bundle)) {
                    return bundle;
                }
            }

            bundle = new KNBundle(path);

            return bundle;
        }
Beispiel #3
0
 public static string KNLocalizedStringFromTableInBundle(string key, string tableName, KNBundle bundle, string comment)
 {
     return bundle.LocalizedStringForKeyValueTable(key, null, tableName);
 }
Beispiel #4
0
        public static KNBundle BundleWithAssembly(Assembly assembly)
        {
            if (assembly != null) {

                string path = assembly.Location;
                string parentPath = Path.GetDirectoryName(path);

                KNBundle bundle;

                if (bundleCache.ContainsKey(path)) {
                    if (bundleCache.TryGetValue(path, out bundle)) {
                        return bundle;
                    }
                }

                bundle = new KNBundle(parentPath, path, assembly);
                return bundle;

            } else {
                return null;
            }
        }