Mark Posted July 13, 2006 Share Posted July 13, 2006 OK, lets say I have English and Spanish in my language selector.When a user changes to Spanish, all the content changes, as it should so.However, the buttons do not, this means my skin list looks like this:Skin 1(English)Skin 1(Spanish)Skin 2(English) Skin 2(Spanish)This is silly, there should be an option that says "If user's language is set to *** use which image directory?"Or do something like this:In style_images, let's say we currently have:skin1_enskin2_enskin1_sp skin2_spOur skins are called:skin1skin2In lang_cache we have:enspI think if the system is using the lang foler "en" and the skin is set to "skin1" - the system should automatically match up skin1 with en and use "skin1_en". Link to comment Share on other sites More sharing options...
Digi Posted July 14, 2006 Share Posted July 14, 2006 I think this is a good idea. I would simply leave the skin options as is (marking the selected style images directory as the "default" one) though and add some new options to the language areas. Scratch that I would simply have the language look for a "default_imgdir"_en /_sp etc on load and if it doesn't exist load the default. Link to comment Share on other sites More sharing options...
Will L. Posted July 14, 2006 Share Posted July 14, 2006 1 Link to comment Share on other sites More sharing options...
Millar Posted July 14, 2006 Share Posted July 14, 2006 Very Nice idea, would be alot neater. Link to comment Share on other sites More sharing options...
soif Posted September 30, 2006 Share Posted September 30, 2006 +1Absolutely needed! for multi-language forums like mine.1) Images sets linked to skin sets2) DatesSomething also missing, is the ability to get dates correctly displayed in each language set.Because, once you setuped the date in the ACP, in english for example, all users using a diffrent language pack are sticked to english dates...3) Help pages, in multiple languages:When your help pages are for example in english, all users , despite they choose another languages, will read help pages in english... too bad ;-)This 3 things would make multilanguage boards really multi-language! Link to comment Share on other sites More sharing options...
Sebastien Penet Posted September 30, 2006 Share Posted September 30, 2006 1 Link to comment Share on other sites More sharing options...
Luke Posted September 30, 2006 Share Posted September 30, 2006 Well there would be no need to change the image set folder at all. What needs to be done is add a sub-folder to the image folder according to the language pack. Like style_images/1/en/ or style_images/1/sp/. All the images with some type of language, like buttons, would be in there and everything else would stay the same. It's not very hard to do at all actually. All the graphics with language are setup as macros. All you would need to do is add the variable for the language being used in the path. The problem is the Macro's are replace on-the-fly. They need to be replaced in the cache so you can drop a variable like that into it. Or simply adding a find-and-replace on the skin output called <~LANG~> to use in the macro's would work. That would actually be an easy modification.+1 for sure Link to comment Share on other sites More sharing options...
tzrtim Posted September 30, 2006 Share Posted September 30, 2006 I agree with living in Spain and having friends in England and France it be better to make everyone happy and not have to try find out what each button means! (But even if it was a yes to this i think it be in like ipb 3.0 Link to comment Share on other sites More sharing options...
Luke Posted September 30, 2006 Share Posted September 30, 2006 Here is a one line modification that should suit your needs:Open up /sources/ipsclass.phpFIND:$this->ipsclass->skin['_wrapper'] = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $this->ipsclass->skin['_wrapper'] ); ADD BEFORE: $this->ipsclass->skin['_wrapper'] = str_replace( "<#LANG_ID#>", $this->ipsclass->lang_id, $this->ipsclass->skin['_wrapper'] ); Save and Upload Then open up your AdminCP and in the drop down go to "Edit Replacement Macros" on every skin. Go through all the graphics that have language in them and replace: /<#IMG_DIR#>/ With: /<#IMG_DIR#>/<#LANG_ID#>/After that move all these graphics to a sub-directory according to the language packs. For example for the english language pack you would use "/en/".Very simple, and a worthy change.If something like this were built into IPB, I would rather have these replacements be made to the cache instead of on-the-fly. It would require you to rebuild templates that have these macros when you edit them, but it may be worth it on the board-end. Link to comment Share on other sites More sharing options...
soif Posted October 13, 2006 Share Posted October 13, 2006 LukeYour fix is simple and smart. :P Now what about adding this to the next IPB release, while also fixing date issues and help pages (see my previous post)? Link to comment Share on other sites More sharing options...
Brandon C Posted October 14, 2006 Share Posted October 14, 2006 This is a good idea, +1 Link to comment Share on other sites More sharing options...
Valtasar Posted May 1, 2009 Share Posted May 1, 2009 Many thanks to Luke! That's a great idea/fix that would have saved me from numerous skin changes, if I just had seed this post earlier. :( Let me say that in 2.3.6 the definition should go to sources/classes/class_display.php I surely hope a similar feature will be added in IPB3.0. Furthermore, unfortunately not EVERY button is added as a replacement macro (some are added in skin_templates, source files or in javascript), I hope there will be improvements in this aspect in IPB 3.0. Link to comment Share on other sites More sharing options...
Mark Posted May 1, 2009 Share Posted May 1, 2009 This topic is almost 3 years old... I do find it interesting reading posts I made before I became a staff member... Anywhoo, In IP.Board 3.0, the buttons aren't images, and thus they change with the language selection :) Link to comment Share on other sites More sharing options...
Valtasar Posted May 1, 2009 Share Posted May 1, 2009 Anywhoo, In IP.Board 3.0, the buttons aren't images, and thus they change with the language selection :) Wow! Thanks! I didn't notice that as well! Well the guy that designed all these images for so many skins to support both languages is really going to have a big party tonight :D Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.