Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted July 13, 200618 yr 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".
July 14, 200618 yr 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.
September 30, 200618 yr +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!
September 30, 200618 yr 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
September 30, 200618 yr 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
September 30, 200618 yr 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.
October 13, 200618 yr 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)?
May 1, 200915 yr 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.
May 1, 200915 yr 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 :)
May 1, 200915 yr 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
Archived
This topic is now archived and is closed to further replies.