HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Multi-language support

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#56096 (In Topic #12193)
Avatar

Fan in action

Another issue with my "nested" sites…
I changed the default language of the site on the subdomain to Bulgarian and started translating texts while browsing.
At some point I realized that a) some texts look garbled AFTER I have translated them (Bulgarian texts, but with some symbols substituted for junk), and b) I am actually editing the English texts… For some reason the language keeps switching between the two.
I suppose it has something to do with the fact that I open the main site too (and may get a language setting from it and then keep it), and the fact that the user profiles are actually stored on the main site, which is NOT multi-lingual, so there's no option to select my language. Even if there was, it would not be of help since I want one language here and another one there…
So, the best solution I can come up with is to declare both sites one-language only, let the sub-site think it's in English, edit its English files and put my Bulgarian translations in them…
Back to the top
 
Posted
Rating:
#56122
Avatar

At some point I realized that a) some texts look garbled AFTER I have translated them (Bulgarian texts, but with some symbols substituted for junk)

Hmm, you're using utf-8 everywhere aren't you, so this seems strange. Can you give an example so I can try and reproduce the problem? Actually one thought – maybe you need to edit the English pack on the Bulgarian site to use utf-8 too, if you are editing the Bulgarian pack whilst using the English pack.

W.r.t. your other problem…
If there's no language choice on the edit-profile form it's because there's only one language installed, and in this circumstance saving the form will not change the language setting in the profile at all, so it shouldn't be a problem. I am wondering if the problem is due to the bug I posted a fix for in the Launchpad help topic earlier (it's using the browser's language setting).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#56133
Avatar

Fan in action

I suppose the garbled texts came from the fact that I POST-ed them from an English page and it had the encoding set as Latin; strange thing is, it only broke some symbols (maybe 10%), not all. Anyway, this doesn't happen now, probably because I changed the English template to UTF too.

Re the other issue - it could be a browser setting, but same as I said - whatever the reason is, I want the site to force a language and not get it from the user's settings, be it from his profile or his browser. This is because I have the same user here and there, and I want him to "speak" the local language of each sub-site when he is visiting it, and also read the respective content (i.e. - if the sub-site has mostly Bulgarian content, and the user sees only English - he will probably see an empty site, where comcode pages and such have been created in Bulgarian only).
Back to the top
 
Posted
Rating:
#56135
Avatar

I realise now one of your sites would have to have BG and EN as EN can't be removed – so editing profiles would force a choice. I'll give it some thought – maybe we will add a hidden option to allow you to give people a "site's default" choice.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#56158
Avatar

I've added a new hidden option as described. It puts a new 'Unset' option in the language choice, so people don't have to make a choice there anymore.


Replacement file:
Attachment
sources/ocf_members_action2.php
» Download: ocf_members_action2.php (56 Kb, 168 downloads so far)


OcCLE command to enable the change:

Code

:set_value('allow_no_lang_selection','1');


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#56163
Avatar

Fan in action

Thanks, will try it tomorrow.
Back to the top
 
Posted
Rating:
#56227
Avatar

Fan in action

I haven't tried it yet, but just a thought related to it: you would have the perfect multi-language system with a bit more code, i.e. - if a page has more than one version, show a link to anyone browsing it "see also Spanish/German etc. versions of this page". On click - show the other language content, keeping the user's interface in his language (another reason to have UTF-8 throughout).
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: