Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 13    Views: 85

MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
10/07/12 03:16 PM (13 years ago)

Localize the BT_config file

Hey. I was thinking about how to localize an app. And thought, well maybe if we localize the BT_config file, and change what we want, having to BT_config files, one for each language. Then the app the app would load the config_file depending on it language. Well it didn't seem to work. Not sure how to localize a BT app. Cheers. Miguel
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
10/07/12 03:19 PM (13 years ago)
Actually, this is something I'd be interested in knowing as well. Maybe you have to have different languages in the settings, and then have a complete rebuild of the app in that language, and it you would change which rebuild of the app you wated throught the language settings bit.
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
10/07/12 03:20 PM (13 years ago)
Thats what I thought, but as soon as I create a localized BT_config file, the app stops loading, giving a "wrong data for the app".
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
10/07/12 03:24 PM (13 years ago)
I don't think it could be automatic. And if you could, it would be a hell easier to do it manually where the user selects. Are you using tabs with this app. If you weren't, then the app would be easy to translate into different languages. If you were using tabs, it would be quite a bit more difficult, and beyond my limits.
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
10/07/12 03:37 PM (13 years ago)
Ya its like a 500 screen app. It uses tabs and lots of menus. What Im was going to do is just make another app in a different language. The app has some html files, what i did was translate those files. And in the config file, translate all the "navtitlebars" and the "titletext" and whatever else necessary. So now I have a identical app but in a different language. Basically what changes is the config file. i kept all the html files with the same name, but they are different files since they are translated. And then i decided to try out localizing the bt_config file, hoping it would load differently for each language.
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
10/07/12 03:50 PM (13 years ago)
Right. I see now. I'm afraid I can't really help now. It's a quite a bit beyond my ability. I'm sorry about that. I wish I could. You could try and publish two seperate apps to the App Store, but I don't think Apple will accept the second one. Unless you published to Google Play, of course!
 
aussiedra
Code is Art
Profile
Posts: 431
Reg: Dec 25, 2010
Brisbane, Austr...
8,260
like
10/07/12 11:16 PM (13 years ago)
there is two files you need to change the BT_config file and add the language local file to xcode. BT_config file changes is only the data and not the settings in english.
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
10/08/12 02:02 AM (13 years ago)
#aussiedra no sure I understood what you said. You say there are two files I need to change. The BT config file And adding the language local file. In Xcode you select a file and then choose to localize it. So what file should I be localizing? Cheers. Miguel
 
aussiedra
Code is Art
Profile
Posts: 431
Reg: Dec 25, 2010
Brisbane, Austr...
8,260
like
10/08/12 03:12 AM (13 years ago)
copy the English.lproj folder with the Localizable.strings rename English.lproj to the language you using the change the Localizable.strings example : English.lproj to German.lproj Localizable.strings / / misc. Text "back" = "Zurück"; "next" = "Weiter"; "done" = "Fertig"; then change the files in the BT_config.txt example: {"itemNickname":"Fertig", "itemId":"3C3B672B4578AEA27EE9D3F", "itemType":"BT_screen_customHTML", "navBarTitleText":"Fertig", "dataURL":"http://www.buzztouch.com/appdata/blank.html"}, dont translate the main header names like "itemNickname" just the info
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
10/08/12 03:19 AM (13 years ago)
Localizing the misc.text, that I can do. what I now need is to have the app load diferent html docs depending on the language the phone is using. And the navbartitles, row titles, tab titles, all need to change dependin on the language. Not sure what to change in the bt config file. So that it will load diffent info depeneding on the language. thats why i thougt that if i'd localize the bt config file, it would do that. At this point i have two config files. One that reads from the Control panel and that has all text in portuguese. And another bt config file, that is the same, but i changed the text to english. Thanks miguel
 
aussiedra
Code is Art
Profile
Posts: 431
Reg: Dec 25, 2010
Brisbane, Austr...
8,260
like
10/08/12 03:30 AM (13 years ago)
you need to set a if Localizable = Portuguese then use xxxxx.txt config file here : //set the configuration file name configurationFileName = @"BT_config.txt";
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
10/08/12 02:24 PM (13 years ago)
#ausseidra Thanks for the input, I understand what you're saying but have no idea how to implement it. Dont know how to add an "if" And as for the new config file I could just add it to the config folder? Cheers. Miguel
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
10/10/12 11:07 AM (13 years ago)
I'm guessing it would be something like this: //set the configuration file name configurationFileName = @"BT_config.txt"; if (Localizable == Portuguese-Portugal) { configurationFileName = @"BTPT_config.txt"; } But it doesn't work. Doesn't recognize localizable, portuguese and portugal. Any suggestions? Thank you Miguel
 
aussiedra
Code is Art
Profile
Posts: 431
Reg: Dec 25, 2010
Brisbane, Austr...
8,260
like
10/15/12 03:27 AM (13 years ago)
need someone with a bigger coding knowledge to get that part right, but thats the right track.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.