Created
          April 24, 2019 10:39 
        
      - 
      
- 
        Save ashour/4ab122d071d7e07bada22df3ab33d6d0 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import Firebase | |
| class Product | |
| { | |
| fileprivate static let COLLECTION_PATH = "product-feed-i18n/locales/{locale}" | |
| // ... | |
| fileprivate static var collection: CollectionReference | |
| { | |
| get | |
| { | |
| return DB.instance.collection( | |
| COLLECTION_PATH.replacingOccurrences( | |
| of: "{locale}", | |
| with: Locale.current.languageCode! | |
| ) | |
| ) | |
| } | |
| } | |
| // ... | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment