The correct way to create an application in non-English only

I need to create an application for iPhone / Mac that is only used in non-English. What is the right way to do this? The name of the application even contains some non-English (unicode) characters. I can divide the problem into three specific questions:

  • How should I deal with the name of my application, say, "Déclaration"? I know that I probably should not have called my Déclaration.xcodeproj project from the very beginning (for example, because it makes the conclusion from git on Terminal very painful). How do I set up my project?

  • How do I work with NSString in my code? Should I just write things like NSString *labelTitle = @"Bienvenue à la déclaration!"; without any hesitation? I know that a more correct way would be to use localization methods, but isn't that too much pain, considering that I only need a foreign language? It seems pretty problematic to make the whole app in English, even if I don't need it.

  • Are there any other things that I should consider when writing an application other than English?

+4
source share
2 answers
  • Do not worry about the release of Git. Mac file names have been Unicode for a very long time. Git uses UTF-8, but it carefully seals non-ASCII characters to avoid them. You can still do things like this:

     git init git add Déclaration.xcodeproj 

    You can disable evacuation using the core.quotepath parameter:

     git config core.quotepath false 
  • Yes, you do not need to hesitate. You can always localize later using strings in your own language as a starting point.

  • Yes, in Info.plist change the local localization development area to the language that you use instead of English.

+4
source

Note that in order to exchange git repositories with non-ASCII letters in the file names, you need to set core.precomposeunicode to true on the Mac before cloning the repository on the Mac:

 git config --global core.precomposeunicode true 

As described in the git configuration page , this parameter is associated with a specific Unicode character decomposition on Mac OS:

This option is used only for Mac OS git implementation. When core.precomposeunicode = true, git returns a unicode decomposition of the file names made by Mac OS. This is useful when sharing a repository between Mac OS and Linux or Windows. (Git for Windows 1.7.10 or later, or git under cygwin 1.7). When false, file names are processed completely transparently with git, which is backward compatible with older versions of git.

Link: Leo Koppelkamm's answer to this question in "Git and Umlaut Problems in Mac OS X"

0
source

Source: https://habr.com/ru/post/1394002/


All Articles