I want a solution for auto translation of data coming from database.
Details:
I am developing a website in multiple language(french & english) using codeigniter.
I have a multiple domain(e.g. for french->domainname.fr and for english domainname.uk).
I have two files folder for each website in ftp but database is same i mean one.
The language of file folder for each website is only in english.
Requirements:
what to do for auto translate the language of website content.
ex. website content will be in french when domainname.fr is loaded, and
english when domainname.uk website is loaded.
I dont want to click on any translate button to translate the website content. it will be auto when website load.
How to auto translate of data coming from database according to domainname.
What you're looking for is called internationalization or i18n.
https://codeigniter.com/user_guide/libraries/language.html
Here's there wiki about using the language class:
https://github.com/bcit-ci/codeigniter3-translations
Related
We are trying to understand different language translation options for our mvc application.
We checked how Microsoft translator widget working. As per their document, we have added embedded script to our pages. It loaded translate button. it is translating content to selected language. But then after if any content loaded dynamically (e.g. making ajax call and loaded some partials in the page), it is not automatically convert to language. We need to again reset and re-select the language to convert again.
Note: In case of google translate widget, they are converting automatically all dynamic content after loading them.
We want same functionality using Microsoft translator widget. Is there any way to achieve this functionality?
Yes there is, Microsoft no longer supports the Translator widget and the available solution is to integrate the Translator Text API in your website or application. To do this you will need to subscribe to the Microsoft Translator Text API. Visit the Getting Started page at http://www.aka.ms/TranslatorGettingStarted and you will find the steps.
I want to implement the option for multi-language on my website. I am using codeigniter framework, and I already implement the codeigniter language library that convert all labels to desire language. But I want my website should also be able to convert the contents from database into desired language.
How can i do that?
Thanks.
Have a look on this tutorial.
Creating multilingual website using codeigniter
i have to develop a minimalistic and simple windows phone 7/7.1 app for my college website for displaying new notices and and any new content in the students' section . The website has a separate page for notices and a separate page for study material download. The site has no rss feeds. Please help me figure out how can i read the data into my app and display it on the app.
the website is www.niecdelhi.ac.in
Thank You
When a site doesn't publicly expose data in a machine readable format, you can scrape the HTML and extract the data yourself. This is a tedious and error-prone process, not to mention that changing the site design will immediately break your code.
To scrape a site, use a library that can access the HTML. For example, you can use HTML Agility Pack to extract data from HTML and then use it for whatever purpose you want.
You can also create a web service that will periodically perform data extraction and you can then publish RSS feed from your own service. This way your mobile applications don't depend on the parsing code which you can always tweak and update.
Generating PDF files from Database using CodeIgniter
for example,
when i click save button all contents in the table can downloaded as pdf format
please help me
thanks...
Take a look at this article.
http://www.christophermonnat.com/2008/08/generating-pdf-files-using-codeigniter/
Also my answer is helful too.
cezPDF in Codeigniter 2
on the user click you should hit a controller function which will query the database and load a view file which you can pass to this library and it will throw it as pdf.
There is no native PDF library in CodeIgniter, so you need to use an third party library or a third party software-as-a-service (SaaS) to generate the PDF.
Here is what I did for one client.
I first generate a nicely formatted, print-friendly HTML page using standard CodeIgniter techniques to select the data from the relevant table, sort it, and echo to the page.
Next, I use the following SasS to turn my formatted HTML page into a PDF download:
http://www.htm2pdf.co.uk
This is a commercial system, but relatively affordable and quick and easy to use.
Alternatively, if you want to do some custom programming, you can try:
http://html2pdf.fr
In this case, you need to link to the class file (external to CodeIgniter) and call
the various methods to generate the PDF. This approach does not require an annual fee
but it will take more programming effort.
You can use codeginter's database utility for getting backup in txt format first http://ellislab.com/codeigniter/user-guide/database/utilities.html#backup
Then you can read the generated file and convert it in pdf using https://github.com/aiwmedia/HTML2PDF-CI
This pdf will you can give for download
We've got a joomla website and are now in the process of developing a sencha-touch application to complement it.
Since our website is in joomla, I don't want to have to write any PHP to extract page data separate from the main site.
Is there any type of querystring parameter that can disable the theme?
IE:
http://example.com/about-us?show-theme=false
If this is not possible, is there any other option to achieve similar results?
index2.php is depreciated and is no longer supported in new versions of Joomla. What you are looking for is ?tmpl=component. You can add that to any Joomla URL and it will only display what you have coded in the /templates/YOUR TEMPLATE/component.php file. The default loads just the component output, but you can customize it to do what ever you want.
Do I get your question right: you want to extract the content from the page, without menu and so on? 2 possibilities, then:
Extract it from the concerning RSS feed (of the front page, of a category ... if you need more options you can install an component such as Total RSS
Use index2.php: example site (This doesn't seem to work if you use URL Rewriting as in your example URL.)
you can add format=raw in the URL. This will only output the content of the component and not the template.
This is used to show printable pages.
You may have to create a view.raw.php file along with the view.html.php