Skip to content

Latest commit

 

History

History
100 lines (91 loc) · 6.95 KB

File metadata and controls

100 lines (91 loc) · 6.95 KB

StringsUtility Project Recommendations

Project tips in order to make StringsUtility as effective and error-free as possible.

Table Of Contents:

  1. Tips
  2. Requirements
  3. Common Errors
  4. Supported Languages

Tips and Standards:

  • Currently does not support multi line strings
  • To avoid unnecessary translation, strings which contains substrings like file extensions, keywords, and symbols will not be translated. Edit strings and files to follow these standards.
    "/", "\\", "{", "}", "_", "#", "%", ".swift", ".xib", ".storyboard", ".jpg", ".jpeg", ".png", ".mp4", ".mp3", ".wav", ".mov", ".gif", "http", "https", ".com", "identifier"
    
  • Strings like url, identifiers, and more which contains substrings like the following will not be constantify.
    "/", "\\", "{", "}", "http", "https", ".com", "#", "%", "identifier"
    

Requirements Checklists

FEATURE 1: Moving Strings to Constant file

  • Have at least 1 constants file (e.g. Constants.swift) in your project for the strings to get stored into.

FEATURE 2: Strings Localization

  • Create a Localizable.strings file. In your project, New File -> String File -> Name it Localizable exactly

  • To support more languages, go to Project -> Info -> Localizations -> + and add all the languages you want to support like the demo below

FEATURE 3: String Translation

Common Error Fixes

  • dialing: google: could not find default credentials.
    • Make sure you have done the following:
    • go get -u cloud.google.com/go/translate
    • export GOOGLE_APPLICATION_CREDENTIALS=[PATH]

Languages Currently Supported

Language Xcode.lproj Key Google Key
English en.lproj en
English (Australia) en-AU.lproj en
English (India) en-IN.lproj en
English (United Kingdom) en-GB.lproj en-GB
Filipino fil.lproj tl
Filipino (Philippines) fil-PH.lproj tl
Spanish es.lproj es
Spanish (Latin-America) es-419.lproj es
French fr.lproj fr
French (Canada) fr-CA.lproj fr
Chinese, Simplified [Mandarin @ Mainland China, Singapore] zh-Hans.lproj zh-CN or zh
Chinese, Traditional [Mandarin @ Taiwan] zh-Hant.lproj zh-TW
Chinese (Hong Kong) [Cantonese @ Hong Kong] zh-HK.lproj zh-CN or zh
Japanese ja.lproj ja
Germany de.lproj de
Russian ru.lproj ru
Portugese (Portugal) pt-PT.lproj pt-PT
Portugese (Brazil) pt-BR.lproj pt-BR
Italian it.lproj it
Korean ko.lproj ko
Arabic ar.lproj ar
Turkish tr.lproj tr
Thailand th.lproj th
Dutch nl.lproj nl
Swedish sv.lproj sv
Danish da.lproj da
Vietnamese vi.lproj vi
Norgwegian nb.lproj nb
Polish pl.lproj pl
Finnish fi.lproj fi
Indonesian id.lproj id
Hebrew he.lproj he or iw
Greek el.lproj el
Romanian ro.lproj ro
Hungarian hu.lproj hu
Czech cs.lproj cs
Catalan ca.lproj ca
Slovak sk.lproj sk
Ukranian uk.lproj uk
Croatian hr.lproj hr
Malay ms.lproj ms
Hindi hi.lproj hi