ACHNBrowserUI
ACHNBrowserUI copied to clipboard
User interface localization
Without even talking about the data, we need to localize at least the UI. There ton of Text constructed with variable in the middle of the string and I don't think it's a good pattern to have. Anyway let's look into it. Never localized a SwiftUI app yet.
- [x] English
- [x] German
- [x] French
- [ ] Spanish
- [x] Italian
- [x] Russian
- [ ] Dutch
- [x] Chinese TW
- [x] Chinese HK
- [x] Japanese
- [ ] Korean
First steps in #92 I‘m going to continue my work. You may give this issue an „in progress“ label.
Let us create a check-list in the issue (maybe someone can copy paste):
(edit: moved list to issue)
Add / remove languages as desired.
I am able to provide ZH_TW Chinese localization but I am not good at Swift Is that any template that I can fill in the translation?
@klin0816 here's the "template" file you use for Localization in iOS: https://github.com/Dimillian/ACHNBrowserUI/blob/master/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings
so for example replacing
"music" = "Music";
with
"music" = "音樂";
I'm sure if you were able to do that it'd help @TheVaan out
Edit: I didn't saw the pull request, so you can ignore most of my tutorial how to do it, but as it could be helpfull for others I will let it as it is. You can read it anyway, because there are some hints that you missed in your PR (@Dimillian already commented this in your pull request)
Original: @klin0816 That would be awesome! As @jonnyklemmer mentioned, there are no Swift skills necessary. We changed the way translation works a little bit - the linked English localization file is not complete.
You have to choose between two ways:
First:
- fork repo, navigate to
/ACHNBrowserUI/ACHNBrowserUI
- create a folder named
zh_TW.lproj
- copy and paste the files from the folder
de.lproj
to your new folder - to localize
Localizable.strings
:- the file contains hundreds of lines with
"English string" = "German string"
; (left: key, right: value) - please don't translate the comment line, because they help us to navigate through the file
- just forget what I have written in German, simply translate what you finde in the key into the value
-
%@
(string) and%lld
(number) are variables that should be inside your translation as well - there are 4 special keys, that can not be translated directly from the key: look into
en.lproj/Localizable.strings
to see the English value for the keys and insert translation into your file - one more "special thing": underneath
// CategoryRow
are categories with lowercase initial letter, I don't know how this is in Chinese but we use capital letter in the beginning because these strings are used as title in some views so the localization should also be capitalized (if necessary in your language)
- the file contains hundreds of lines with
- to localize InfoPlist.strings:
- this one is simple, here you only have to write the description that is shown when the app asks for access rights to photos. So you need to translate the following:
"Save images like furniture or generated images from the share function"
and replace the German value with yours
- this one is simple, here you only have to write the description that is shown when the app asks for access rights to photos. So you need to translate the following:
Second:
- I create you a gist with all strings inside that need to be translated, included the English strings for keys that are not directly localize because they are abstract
- you create a gist with all localized strings inside
- I push it to the repo
I would prefer the first way, because I don't want to steel you a contributor entry to the app. Translation costs time, that should be honored!
One tipp: Use nookipedia to find translation of villagers name. Each villager has an information box with all known names in different languages.
@TheVaan Thanks for your guide anyway. I will try to complete the translation ASAP.
Hello. I want to Japanese Localization. Would you tell me how to do it?
@mimikun that's great! Thank you! You can follow the tutorial I posted above. Use as name for your folder ja.lproj
- you don't need Xcode, it can be done with any editor, case the strings file is plain UTF-8.
Or UTF-16 in case of Japanese/Chinese, and it works. Just pulled the Chinese items and now we have it in the app @klin0816 :)

@TheVaan Thanks. I'll try to complete the translation ASAP.
I am able to provide “Chinese Simplified” and I am familiar with swift. But there is no “Chinese Simplified” option in your comments☹️
@kartbnb I can add it. The amount of Chinese language variants is not that transparent to me 😅 You are welcome to create a pull request with translated data!
You have two options:
- simply add the folder then import the localization; file doesn’t have to be translated at this point, it only has to exists (or @Dimillian can import)
- add a new localization to Localizable.Strings via menu
Hi, I can provide the Italian localization, if anybody isn't working on it just yet. 😀 The folder name for the Italian language is it_IT.lproj
?
@MrOgeid this would be awesome! There is no one translating to Italian (as far as we know). The folders name has to be it.lproj
@TheVaan Ok! Thank you for the correct folder's name! I'll try to translate all the string as soon as possible!
And for items and villagers, they should already display in Italian. You can confirm @MrOgeid ?
@Dimillian Villager's names are displaying in Italian but I see the items in the Catalog in English.
@MrOgeid On latest commit I've enable Italian so you'll find the correct folder and file. And it also enable Italien items :)
@Dimillian Sorry, probably I didn't understand.😅 I don't have access right know to Xcode as I'm not a very expert software developer, I'm more a graphic designer and copywriter.
Well if you start your translation from the last commit, you'll find the It.lproj folder with the file ready :)
Thanks @Dimillian !
Hi @Dimillian I translated in Italian all the strings from Localizable.strings in the "de.lproj" folder into the same file in the "it.lproj" folder. But I'm not quite sure if I made a correct pull request.😬
Congrats to @mimikun for adding japanese in #136 !!
Added credits in our readme :) https://github.com/Dimillian/ACHNBrowserUI#localizations-credits
I'll try to tag on this issue everything I'm adding to French localization (which should be everything we have to localize) so it give a change to anyone who wants to updated their localization file to do so :)
I figure this thread is better than opening a new issue but there are quite a few strings that are in other languages that aren't in the English file (e.g: "Friendly Reminder") Should the English strings file be expanded?
No. Swift uses the key as translation if there is no localization. So we only add a key to the English localization if it is an unreadable key.
I think I'm done with Korean one. Is there anything missing I have to do?