-
Is it POSSIBLE ??? Translations in specific lines ???
And hello, yet one more time!
Still working on my quest for perfect or near perfect page translations, I'm trying to determine what extra snippets can still be translated without messing up the video portal. I already know that I cannot translate 'friends' in the following code since that is not part of a standard viewable text.
Code:
<?php require_once(SMARTY_CORE_DIR . 'core.run_insert_handler.php');echo smarty_core_run_insert_handler(array('args' => array('name' => 'friends_count', 'assign' => 'frnd', 'uid' => $this->_tpl_vars['friends'][$this->_sections['i']['index']]['FID'])), $this); ?>
I also know that I can't translate 'friends_name' in the following line because the underscore makes that pretty obious.
Code:
<?php echo $this->_tpl_vars['friends'][$this->_sections['i']['index']]['friends_name']; ?>
However ... it appears to me that I should indeed be able to translate items such as 'Confirmed' in the following line because the capitalized letter "C" as well as Parentethes and those two == symbols seem to indicate, to me anyway, that this is viewable text in a browser which can be translated.
Code:
<?php if ($this->_tpl_vars['friends'][$this->_sections['i']['index']]['friends_status'] == 'Confirmed'): ?>
Can someone please confirm this for me?
I would certainly appreciate a little clarification here. Thanks.
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
The command that you entered is part of an if statement that is reading the database to see if your friend status is confirmed. However, that appears to be only a portion of the code. I would need to see the entire statement to determine whether or not you can change "Confirmed." Based upon where I think you pulled that code snippet from, the answer would probably be no. The reason is because the code itself is reading the friends table in your database and is literally looking for the status to say "Confirmed." Changing it from "Confirmed" would fail the statement, if you understand what I mean. The only way to keep the statement valid would be to change the SQL statement that made the table's friend status say "Confirmed" to begin with. However, the SQL statement that you would need to modify is encrypted.
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
It's not in the language files?
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
Quote:
It's not in the language files?
No, not at all.
One of the reasons for purchasing the script was because I had emailed before the purchase and was told that there were language files. Well, I'm not even sure why anyone bothered to go through the trouble for language files since all of them contain nothing but site messages that appear here and there for whatever reasons ... mostly errors or problems. Those could have been translated without placing them in separate files ....
I'm using vShare on a public site with over 40.000 files and a monthly traffic of apx. 6000 visitors, and that's without any promos whatsoever. Germanys most practical freebie site. It really bites that they sell the script, claim to have support, yet I can't find or receive any support from any vShare developers. That's BS, especially when you have to consider that a user may want to create a professional custom portal ... and not tell him or her that he or she should have spent more money on a better portal DAYS and DAYS and HOURS upon HOURS after they've been working on the portal already.
In my email, I asked specifically about being able to translate everything in german and was told by someone at vShare that this would not be a problem. I was NOT TOLD that only some items would be translatable, and not all items. I speak, read, and write both langages 100% fluently so the translations are no issue to me, and I know a bit about code too, but this complete lack of support is just plain uncalled for. Nobody knows these intricacies better then the vShare developers.
Sorry ... irritated ... venting.
I guess I'll have to look into some server and php forums to answer some of these intricate questions. I do know for a fact that everything except for the raw hard code is translatable if you only know where to look or go. But these people have no interest to help at all. Funny, they could respond to email queries BEFORE the purchase, and afterwards not a peep ...
Very unprofessional.
Ah, well.
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
See if igorcreed has anything to offer...
viewtopic.php?f=12&t=2180
I don't expect that english is the main language of the developers.
Always remember that "you get what you pay for"...and for $10, don't expect a whole lot.
The support mainly comes from other users. Admin does pipe in occassionally but a lot of the questions that people ask have already been answered elsewhere in the forums. There is always the addive "Leave them alone long enough and they will figure it out on their own"...and for $10, I expected exactly that and when/if I don't get instant support, I'm not disappointed. Maybe I'm a pessimist, but if I don't expect a lot, then I don't get disappointed. If I was that disappointed, I'd be using a different script since nobody is twisting my arm to use vShare.
Any purchase is going to be a gamble...whether it's a script of a pair of shoes. If I buy a $2 pair of shoes from a street vendor, I can probably guess they'll hurt my feet and the vendor will be gone and won't give me my money back or fix the shoes...that's a chance I take and the $2 price tag alerts me to this fact.
All in all, for $10, I have been very pleased with this script.
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
Nope, that didn't help, thanks anyway!
That was the first thing that I did, translate all of those files which is how I learned that those were mostly just system messages. All in all, I'm pretty satisfied with the vshare script. My main gripe is about the fact that when questions are asked that ONLY the developers can answer, you'd think that they'd step into their own forum? After all, how many such difficult "internal questions" are asked? More than likely not more than one per week, if that? Hence we're not even talking about much time off their hands ...
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
What I was suggesting is that you get a hold of igorcreed, you can find his contact in that post. S/he might have some insight.
I agree that the support from Admin is lacking, but that's what I expected would probably happen. :/
I know the script has been translated also into Arabic and also Hebrew. In that event, not only is the language "backwards" so is the templates (no small feat) and it has been done.
See if AMIR (search for arabic or hebrew). Maybe Amir has some suggestions.
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
Now, now, of course I went there to see if help's available. :!:
But I could see immediately that he ran into exactly the same problem that I did.
Everywhere, where a clip description states something like: Added xx days ago we end up with stuff like Hinzugefügt xx days ago. Being that it's a video portal, that kind of stuff is visible EVERYWHERE. And that's what's so irritating. You can translate the added part which looks identical in text and color as the rest of that line, but you can't translate the days ago portion which doesn't even make sense (to me) because I don't see any reason for that kind of stuff to be encrypted or hidden ... least of all if you're selling a script with the foreknowledge that it would "eventually" be translated by someone.
But yeah, I'll try Amir .. just not today anymore. Gotta focus on some other things first. Thanks again. :wink:
.
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
Understood, but it was an old post and maybe igorcreed figured some stuff out but didn't post results? That happens a lot. I figured, contact him anyway. See what he says. I hope Amir can help ya.
We ran into a similar problem with support when trying to figure out how to get a person's profile picture and URL from their profile page to show up in the view_video.tpl....*eventually* we got a reply, but not until after wracking our brains and after quite a while (about 4 months at least).
Oh yeah, I just remembered something else...one time I had a heck of a time getting ahold of Admin and so I posted in the hostonnet forums...amazingly I got a reply the next day. :wink:
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
Yup, tried all of that too. Problem with my commercial search/replace software is that it only accepts x number of file types and sometimes it seems to me like it's behaving a little odd, although not 100% certain on that. When I search, I search the entire root folder of the portal with all of its contents AFTER I made sure to upload the whole thing onto the hard disk. But my searches are limited to PHP, TPL, HTM, HTML, ASP, TXT, DOC and XLS. If the items in question are hidden in other file types such as .INI, .CSS, .CONF, .CGI, and so on, then they won't show up for me.
My commercial editing software can open up just about any file. So when I utlize the *.* function for file opening, I'll get to see EVERY file in that folder, regardless what type it is. That won't tell me where the hidden information is though. Sure, the info. can be found and I'm sure it's just a matter of time until you or I find it, but I was seriously trying to avoid having to spend "oodles of time" with something that should actually require very little time. Hmmm, I suppose that I could try a windows disk search with Vista/Ultimate and the new & improved "super search indexing" options ... later on or tomorrow perhaps. Let me know if you get lucky with your searches. Thanks!
.
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
I scanned all the files with DreamWeaver for the word "ago" and got zero results.
I suspect this type of thing is located in includes/functions.php which is Zend Encoded. I don't think the guys at vShare purposely "lied" about the ability to translate vShare, they probably just didn't take into account the fact that some of the language they use is within some of their Zend Encoded files. Which sux for us until Admin can address it.
Try the hostonnet forums.
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
Weeeeeellll, I found this here under include/smarty/libs/function.html_select_date.php
(Sorry, had the wrong section a couple of minutes ago)
Code:
}
if ($display_years) {
$field_separator_count++;
if (null !== $field_array){
$year_name = $field_array . '[' . $prefix . 'Year]';
} else {
$year_name = $prefix . 'Year';
}
That's not all of it, but it looks to me as though there might be something in there that could be changed perhaps?
In particular this line here, looks like it could have the word Year translated because that sure looks an awful lot like a visible reference.
Code:
$year_name = $prefix . 'Year';
Problem is that I can't even be 100% certain if it'll actually have an effect on the portal at all since smartycode is used so widely, often without being cleaned up real well from one app to the next. But hey, I'll give it a spin shortly after doing some backups 'n stuff. Will report on the results. Later ...
.
Okay, I'm back, went ahead and tried editing the Day, Month, and Year function.
Didn't do any good though, not in the admin section, nor the portal itself.
But if smarty has anything to do with it, I still think that those are the files since there are several of them for date, time, etc. functions. I just don't know enough about that code to be able to figure out exactly where the changes would have to be made ... if that would indeed make a difference in the first place.
Sorry, I'm giving it up for today. My eyeballs feel like they're in the back of my head ... :)
.
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
Yeah, I noticed those too, ...however, still can't find the "days ago, hours ago"...the common word being "ago", which is what I searched for and came up empty handed. I checked every file, every one of them, including the smarty and java stuff.
I still think that stuff is in the include/function.php which is Zend Encoded.
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
The code above is a smarty function for building date-based drop down menus. However, changing that code will do nothing for you as "Year" isn't displayed. Rather, PHP uses that to build the dates. It is used on the signup pages where dates are asked for (if you have age turned on).
It would really help you to learn a bit about PHP programming (the basics). By doing this, it will save you a lot of frustration trying to find things that you can translate. There are many things that "look" like they are displayed in the browser but, in fact, are not.
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
That's why I'm guessing it's in the zend encoded php files. Would I be correct in assuming that?
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
Yes. A lot of what he is wanting (and needing) to change is in the encrypted files. Some of the files are merely displaying what is written in the DB. Some of his issues (such as the xx days ago) is due to the fact that some of the commands being used in the PHP files are not localized (for example, the function date() is English only. To make the output localized, you have to use the setlocale() and strftime() functions). In order for him to achieve exactly what he is wanting, he is going to need an open-source script. He can spend as much time as he would like on vShare. It's just not going to do him much good.
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
oh noes.
Hey, since I have your attention and you're a php guru...would you make us a SMF forum bridge...how much would you charge?
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
What all are you looking for in terms of a "bridge?" Are you just wanting the two applications to share user data? Or are you wanting something more complicated?
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
What everyone here at vShare has been screaming for is a bridge between vShare and SMF Forms in terms of log in so that ppl don't have to log in twice (one user login for both things).
Think you can do it? You will make a lot of "best friends" if you do. LOL
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
I'm pretty certain that I can do it. What I'm not certain about is whether it can be done. Here are the challenges:
1. User Information Sharing
2. User Session Sharing
The problem is that with both of those challenges, the easy solution lies within the encrypted PHP files (i.e. having the signup php copy the information into the other program on account creation and having login.php create both sessions when a user logs in). I'd have to really look into this to see how much can be done for this (without violating any of vShare's terms).
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
@bplex
Quote:
he is going to need an open-source script. He can spend as much time as he would like on vShare. It's just not going to do him much good.
Okay, I have a lack in php knowledge, I'll grant that. But considering the fact that I'm working 60 hours per week with html, javascript, perl/cgi, serious graphic arts, translations, etc. there isn't a lot of time or patience left in my brain to start learning more on php. I have a family, child, 2 large dogs, and they're already unhappy about my work load. Having said that, and believing that I'm not entirely stupid, I still have to disagree somewhat with the php guru bplex though, because ....
.... I've been working with code for the past 14 to 15 years and one of the biggest clues that I look for when working with translations, is the specific manner with which text is embedded into the code and command lines. For example, code is at least 99.99% of the time written in small letters (not including html tags which could go either way). So, when I see a line of code with something like 'Pending' or "Year" then it's the capital letter P or Y which indicate to me that this is merely a REFERENCE that is being used by the file that I'm looking at, and by very specific files that have command lines of sorts which are in turn referring to those specific words. Hence (and like I said, I've been doing this for years, writing translations that actually work) if I knew the names of all of the files with such exact references, then a modified global search and replace command can actually change those to whatever you want ... and still work ... as long as you're not using special characters (and even that can actually be done with yet more patience and time). The problems that I'm having with the translations aren't actually nearly as complicated as bplex infers. It's just a matter of knowing WHICH files and WHERE they're at, period. Zend encoding or not, doesn't make a difference if you have the right software!
EXAMPLE (hypothetical): The SQL DB, 12 Template files, 6 more hidden files within includes, and 47 additional files thoughout the video portal utilize the word 'Pending' in order to jive all across the board. Well, if I knew the specific names and locations of all 65 files (not counting the SQL), then I could change 'Pending' to 'Geewillickers' and guess what? Yes, it would all work just as well as it did before ...
But ... no problem. I'm giving up looking on the forum for translation assistance. I'll write to the support directly and hopefully will get something out of that. This Sunday I'll look at the sql db which I've already extracted in order to see if I can find something in there. Eventually all will be well, I was just hoping that I wouldn't have to tediously "snipe" at dozens or even hundreds of files over the course of months, while knowing that the developers could provide assistance in a matter of minutes, if they cared or wanted to.
Hey, have a great upcoming weekend and please keep an eye out for my other posts, the ones that have nothing to do with translations. It's been a pleasure and I really do appreciate every useful bit of information.
.
-
Re: Is it POSSIBLE ??? Translations in specific lines ???
I'm not trying to say that you are stupid, nor am I trying to say that you do not know what you are doing. What I am trying to tell you is that what you are wanting to do is not going to be possible with vShare in its current design. Maybe you need an example to understand what I am trying to tell you.
You want to translate the word pending. So, you use your software to search all of the files for the word "Pending" to "Geewillickers." With an open source script, this would work just fine. You would be able to search all of the references for the word and if you change every single reference, everything would work fine and use the word "Geewillickers." So, if there are 6 SQL files, 12 DB files, and 50 PHP files and you change the code in all 68 of them, you good to go.
However, here is your problem with vShare. You want to change the reference of the word "Pending" to "Geewillickers." So, you use your software to search all of the files to replace what you want. vShare is composed of over 100 different files (between templates, images, and php scripts). 60% of vShare's files are encrypted and cannot be edited. Thus, when you change the reference of the word "Pending" using your software, you are only changing it in the 40% of the files that are not encrypted. Thus, you are only going to end up with a script in which 60% of the files are using one term and 40% are using another. And, if one of the encrypted files is doing the writing and the encrypted file is doing the reading, if you change the code in the one that is not encrypted, you will break the functionality.
Here is another real example for you. You talked about the word "Confirmed" earlier. You stated above that if you knew WHERE the word was, your "professional" software could change it, encoded or not. Well, what if I told you that you can find the word "Confirmed" in the file friend_accept.php in the main folder of your script. Now, open up that file. What do you notice? You have about 3-4 lines of readable text talking about Zend Guard. Then, you have a bunch of lines that look like garbage. Do you know that the "garbage" that you see in that file is actually the code for that file? Did you also know that the code for that file has a SQL statement in it that is writing the word "Confirmed" in plain English? But, here is the problem, there is nothing you can do to change it! Why? Because the code is encrypted. This is the point I'm trying to get across to you. This is why I stated that you should learn a little bit about PHP. I'm not asking you become a programmer. I'm not even asking you to learn anything more than just how PHP statements should look. If you knew at least this, then you would also know that PHP is NOT a binary language. It is a "pre-processor" language (similar to HTML, Perl, JavaScript, etc). This means that PHP code is written using normal language and is executed as normal language and not as compiled binary files (an example of a post-processor language would be C#. After writing a file in C#, the only way to get it to run is to compile the code which turns it into a binary file that is no longer editable. You can then distribute the file [as a .exe] to people for them to use). So, if you are seeing PHP code which is binary (such as vShare), then that means that the code itself has been compiled (or encrypted) using another piece of software (in our case, Zend Guard). Because of this, if there is anything that needs to be changed within the compiled code, unfortunately, it cannot be done from a user point of view. And this is where we are with you. You are needing to change all English language printable (and writable) text. Unfortunately, part of the text that you need to change exists in code that is encrypted and not changeable. [b]This is why you are having such a difficult time finding what you are needing![b] It's not that your software isn't good or that you are incompetent. It's all due to the fact that you are struggling to find language to change in a piece of software that is mostly encrypted and not editable.
Check your PM, I'm going to send you something.