<commit_before>//
//  LocalizeSwift.swift
//  Localize
//
//  Copyright © 2019 @andresilvagomez.
//

import Foundation

/// Name for language change notification
public let localizeChangeNotification = "LocalizeChangeNotification"

/// Internal current language key
public let localizeStorageKey = "LocalizeDefaultLanguage"

/// Different types to localize your app, using json files or strings default by Apple.
public enum LocalizeType {
    /// Custom localize protocol.
    case json
    /// Default Apple protocol.
    case strings
    // Custom provider
    case custom(provider: LocalizeProtocol)
}

/// Is a pricipal class, contents all logic to localize your keys
/// read json and determinate all configurations.
public class Localize: NSObject {

    // MARK: Properties

    /// Shated instance
    public static let shared: Localize = Localize()

    /// Provider to localize your app.
    private var provider: LocalizeProtocol = LocalizeStrings()

    /// Show all aviable languajes whit criteria name
    ///
    /// - returns: list with storaged languages code
    public var availableLanguages: [String] {
        return provider.availableLanguages<commit_msg>Fix typo on 'shared instance'<commit_after>//
//  LocalizeSwift.swift
//  Localize
//
//  Copyright © 2019 @andresilvagomez.
//

import Foundation

/// Name for language change notification
public let localizeChangeNotification = "LocalizeChangeNotification"

/// Internal current language key
public let localizeStorageKey = "LocalizeDefaultLanguage"

/// Different types to localize your app, using json files or strings default by Apple.
public enum LocalizeType {
    /// Custom localize protocol.
    case json
    /// Default Apple protocol.
    case strings
    // Custom provider
    case custom(provider: LocalizeProtocol)
}

/// Is a pricipal class, contents all logic to localize your keys
/// read json and determinate all configurations.
public class Localize: NSObject {

    // MARK: Properties

    /// Shared instance
    public static let shared: Localize = Localize()

    /// Provider to localize your app.
    private var provider: LocalizeProtocol = LocalizeStrings()

    /// Show all aviable languajes whit criteria name
    ///
    /// - returns: list with storaged languages code
    public var availableLanguages: [String] {
        return provider.availableLanguages
{'fraction_non_alphanumeric': 0.08094435075885328, 'fraction_numerical': 0.003372681281618887, 'mean_word_length': 3.1126516464471403, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3059539', 'n_tokens_mistral': 616, 'n_tokens_neox': 584, 'n_words': 239}