Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 3    Views: 103

Adnan Basra
Aspiring developer
Profile
Posts: 189
Reg: Apr 26, 2013
Salmiyah
2,940
07/30/13 06:07 AM (12 years ago)

Solved: Adjusting the direction of RTL languages in BTA design Menu

I am designing my first app in Arabic. The problem was the Arabic text was aligning as LTR instead of RTL. I asked Danny (developer of BTA Design Menu Plugin) and he gave me this awesome solution. I am sharing it someone else who had encounter this issue too. As a work around you can do this (but not all functionality regarding the Title and Description will remain, but you should try to see if it fits your needs): In BTA_cell_designMenu.h change every UICustomLabeldesignMenu in UILabel in BTA_cell_designMenu.m line 63 titleLabel = [[UICustomLabeldesignMenu alloc] init]; change to this titleLabel = [[UILabel alloc] init]; on line 102 descriptionLabel = [[UICustomLabeldesignMenu alloc] init]; change to this: descriptionLabel = [[UILabel alloc] init]; On line 96 titleLabel.lineBreakMode = NSLineBreakByTruncatingTail; add this line titleLabel.textAlignment = NSTextAlignmentRight; on line 106 descriptionLabel.lineBreakMode = NSLineBreakByTruncatingTail; add this line descriptionLabel.textAlignment = NSTextAlignmentRight; That did it for me. Thanks to Danny again. Best Regards, Adnan
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
07/30/13 09:43 AM (12 years ago)
Danny is a awesome dude, one of the smartest guys I know. Thanks for posting this solution on the forum for others to see! David
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/30/13 02:51 PM (12 years ago)
Very cool. Glad this came about. Go Danny! :) Cheers! -- Smug
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
07/30/13 04:15 PM (12 years ago)
Hi Adnan, Great to post the solution here and share it with the rest of the world. Line numbers may not be correct but just search for the code snippets. Some functionality may stop but in Adnan's case it was the right (code) change. @MrDavid and @Smugwimp thanks for the heads up!! Best regards, Danny
 

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.