Storyboards provide a nice design-time experience for UI layout, navigation
design and can be faster to load in your app than XIBs. Regarding l10n
however, this quote is from Apple's docs:

*Note:* Before Xcode 4.5, developers and localizers had to modify
storyboards and nib files for each language an app supported. The task
required not only that they translate the visible or audible text of a
storyboard or nib, but that they adjust the sizes and positions of views
after translation.
--------

In iOS5 an earlier, it isn't possible to 'localize' a Storyboard file...
there were two options available:

1) create a separate *.storyboard _for each language_ (ie. copy and paste
the storyboard into each *.lproj folder, and type the localized strings
into the storyboard directly)

2) create your storyboard _not_ in an *.lproj folder, and ensure all the
localizable elements have an outlet created so you can access from C#. Then
in your MonoTouch code, set the display properties directly eg

title.Text = MonoTouch.Foundation.NSBundle.MainBundle.LocalizedString
("Task Details", "Task Details");

Both these approaches are very manual.

In iOS6 Apple introduced a new concept called Base Localization - but this
ONLY works on iOS6 so if you want backwards compatibility with iOS5 and
earlier, you can't use it. There are details in this link
https://developer.apple.com/library/ios/#referencelibrary/GettingStarted/RoadMapiOS/chapters/InternationalizeYourApp/InternationalizeYourApp/InternationalizeYourApp.html
This method introduces a new folder - Base.lproj - where you put your
*.storyboard files. Then in each *.lproj folder you create a .strings file
with the same name as the storyboard.

For now, MonoDevelop does not offer the IDE helpers that Xcode does (as
described in that link) but you *can* do it manually - i've just pushed an
example
https://github.com/conceptdev/xamarin-samples/tree/master/TaskyL10nStoryboard
note that it does get tricky - you need to match up the object-ids in Xcode
to create the localization keys, like this:

"SXg-TT-IwM.placeholder" = "nombre de la tarea";
"Pqa-aa-ury.placeholder"= ;
"zwR-D9-hM1.text" = "Detalles de la tarea";
"bAM-2j-Rzw.text" = "Notas";
"NF3-h8-xmR.text" = "Completo";
"MWt-Ya-pMf.normalTitle" = "Guardar";
"IGr-pR-05L.normalTitle" = "Eliminar";
HTH
cd


On Fri, Dec 28, 2012 at 5:48 AM, Morten Kruse <krus...@msn.com> wrote:

> I think that it is a NO then.
> It is not possible to localize the storyboard.
> But why use it then?
>
>
>
> --
> View this message in context:
> http://monotouch.2284126.n4.nabble.com/Storyboard-and-localization-tp4657895p4657902.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> MonoTouch@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>
_______________________________________________
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to