Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

made LocalizeStrings.swift and LocalizeJson.swift to allow customization #66

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ let package = Package(
name: "Localize",
path: "Source",
exclude: [
"LocalizeExtensions.swift",
"Tests",
"Example"
]
Expand Down
4 changes: 2 additions & 2 deletions Source/LocalizeJson.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fileprivate extension JSON {
}
}

class LocalizeJson: LocalizeCommonProtocol {
public class LocalizeJson: LocalizeCommonProtocol {

/// Create default lang name
override init() {
Expand All @@ -73,7 +73,7 @@ class LocalizeJson: LocalizeCommonProtocol {
/// Show all aviable languages with criteria name
///
/// - returns: list with storaged languages code
override var availableLanguages: [String] {
public override var availableLanguages: [String] {
var languages: [String] = []

for localeId in NSLocale.availableLocaleIdentifiers {
Expand Down
4 changes: 2 additions & 2 deletions Source/LocalizeStrings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation

class LocalizeStrings: LocalizeCommonProtocol {
public class LocalizeStrings: LocalizeCommonProtocol {

/// Create default lang name
override init() {
Expand All @@ -18,7 +18,7 @@ class LocalizeStrings: LocalizeCommonProtocol {
/// Show all aviable languajes whit criteria name
///
/// - returns: list with storaged languages code
override var availableLanguages: [String] {
public override var availableLanguages: [String] {
var availableLanguages = bundle.localizations
if let indexOfBase = availableLanguages.firstIndex(of: "Base") {
availableLanguages.remove(at: indexOfBase)
Expand Down