From 41f019d7b2f470161e385c6e9bcb1b77ef29f0e0 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Fri, 19 May 2023 16:46:23 +0200 Subject: [PATCH] Written the documentation for the "localisation(for:)" function of the Bundle+LocalisationBundle extension. --- Sources/Core/Extensions/Bundle+LocalisationBundle.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/Core/Extensions/Bundle+LocalisationBundle.swift b/Sources/Core/Extensions/Bundle+LocalisationBundle.swift index 0b3b73a..ee2205a 100644 --- a/Sources/Core/Extensions/Bundle+LocalisationBundle.swift +++ b/Sources/Core/Extensions/Bundle+LocalisationBundle.swift @@ -16,6 +16,10 @@ public extension Bundle { // MARK: Functions + /// Retrieve a localisation bundle for a given language code or identifier, if exist inside a certain bundle. + /// - Parameter languageCode: A string that represent a language code or identifier. + /// - Returns: A `Bundle` instance that contains localised resources based on a given language code or identifier. + /// - Throws: A `BundleError` error in case the localisation bundle for a given language code or identifier is not found inside a certain bundle. func localisation(for languageCode: String) throws -> Bundle { guard let path = path(forResource: languageCode, ofType: .ResourceType.localisationBundle),