Hi guys.

I have the following problem:

On a page I have a view with a block display which displays rows with data.

On each row there is a link which when is clicked, calls a php script using ajax. When the link is clicked,

the row must disappear. The view must be refreshed without reloading the page so that's why I'm using ajax.

The php script which is called deletes the row from the database, gets the updated view data through execute_display()

and return the result which is in fact the html code of the updated view. The problem is that this view generated by execute_display()

is not translated on the current user's language! I tried to translate it in the php script using t($view) but it didn't work, I suppose

because of the html code in the $view variable.

If you know some solution to this problem or if you know another way to refresh the view without reloading the page (maybe using some module) please share it with me.

Thanks in advance.

Comments

simosda’s picture

Before I used a direct call to the php script without the language in the url. That's why the
view was not translated. Now I'm using a call to a drupal page with url containing the language. It works perfectly!

simosda’s picture

The problem is not solved because now there is another problem - the next and previous links of the view are not working.

The reason is that I don't call the ajax script directly but through a page.

So I have to find another solution.

Any idea?