| How to resize a xul pref dialog according to every language |
|
|
| Written by Goofy | |||
| Monday, 04 June 2007 | |||
How to resize a xul pref dialog according to every languageThe problemPreferences Dialog is not resizable (see Bugzilla #122345), so it happens every now and then that the size of the window can be perfect for English language but not so perfect for other languages, once translation is done.Here is a simple example:
A simple solutionImportant: there is another solution provided by teo for more advanced coders. Just read this thread http://www.babelzilla.org/forum/index.php?showtopic=3229All you have to do is to add a style attribute to your prefwindow and make the width a localizable entity. Translors will have to determine the optimum value to give to this entity in their locale, they will adjust after some tests so that it matches perfectly for their own language.Here is one code example in prefs.xul <!DOCTYPE prefwindow SYSTEM "chrome://attachmentextractor/locale/attachmentextractor-prefs.dtd" >in attachmentextractor-prefs.dtd in en-US locale <!ENTITY attachmentextractor.settings.width "80ex"> 80 ex is not enough for French language, it needs "100ex" in the fr-FR locale, so now the sentence is complete ![]() ![]() Note about unitsWidth (or height) can be set in various units and is generally in px or em, but it seems it is recommended to use ex. See this article in Mozilla Knowledge Basea Goofy mini-howto |
|||
| Last Updated ( Wednesday, 27 June 2007 ) | |||



for other languages, once translation is done.







