multilingual

URL and database routing based on language

。_饼干妹妹 提交于 2019-11-29 02:45:21
I have URLs in the following form: http://example.com/[language_code]/xxx I need to do: 1. Based on the language code, I want to select appropriate DB or raise Http 404 if language code is not supported. 2. I'd like to save the language code in the request object preferably, so I can access it in my templates. 3. I'd like my urls.py don't look like this: url(r'^(?P<lang>\w+)/xxx/$', 'my_app.views.xxx') but rather: url(r'^xxx/$', 'my_app.views.xxx') so django will completely ignore the language code in the URL. Can anyone tell me please if this is doable with django or I should look for another

How to show specific language keyboard when user input values in UITextField in iPhone App?

流过昼夜 提交于 2019-11-29 02:43:48
I want to build an iPhone Application which supports multi-language. In that I want to input values in the language which user has selected from a set of languages in my application's settings. Accordingly, it should show selected language keyboard. For eg : If user has selected French Language from my application's setting. Then in all the UITextFields of my application, user should be able to input values in French Language. So for that when keyboard opens I need to make sure that it is French Language Keyboard which it shows every time instead of default language keyboard. So the question

Change language in Laravel 5

孤街浪徒 提交于 2019-11-29 02:19:05
I just begin to use Laravel 5.4, In the login.blade.php i have I don't like to put plain text in html code, is there a solution to make all the texts in seperate lang files to use them dynamically? Thank you Alex Yapryntsev The resources/lang folder contains localization files. The file name corresponds to the view that it will be used. In order to get a value from this file, you can simply use the following code: Lang::get('localization_file_name.variable_name'); If you want to realize the possibility of language selection, you only need a few simple steps to apply: In config/app.php add this

Setting language for TTS programmatically?

北慕城南 提交于 2019-11-29 02:17:27
I have written a small Android Demo to use TTS in different languages. I have a layout with two buttons, Spanish and English. Pressing the button triggers an utterance in the language selected. However, I can't change the language (setLanguage (Locale locale)). I can do it by hand, using the phone settings and changing the TTS language to US, UK, Italian, German, etc, but my code doesn't seem to work. Could you tell me where the problem is? Thank you!! package com.ignacio.SpeakAPP; import android.app.Activity; import android.os.Bundle; import android.speech.tts.TextToSpeech; import android

htaccess multi language site with sub directories, and default 301

﹥>﹥吖頭↗ 提交于 2019-11-28 23:30:38
I am having some issues setting up my htaccess to allow multiple languages utilising the sub directory method eg: http://www.domain.com/en/ http://www.domain.com/sw/ http://www.domain.com/ie/ Also to complicate things, the project isn't currently live, its on a dev server. For example, I am currently accessing the project at: http://dev.domain.com/devname/projectname/ And I want the above to automatically 301 redirect to: http://dev.domain.com/devname/projectname/en/ Here is my htaccess: Options +FollowSymLinks -MultiViews RewriteEngine on # ----------------------------------------------------

Multi-lingual web application - how do I detect the user's language in ASP.NET?

天大地大妈咪最大 提交于 2019-11-28 23:09:55
I'm building an ASP.NET web application, and all of my strings are stored in a resource file. I'd like to add a second language to my application, and ideally, I'd like to auto-detect the user's browser language (or windows language) and default to that, instead of making them choose something besides English. Currently, I'm handling all the resource population manually, so adding a second resource file and language is trivial from my point of view, if I had an easy way to automatically figure out what language to display. Has anybody done this, or do you have any thoughts about how I might

How to make a MediaWiki site multilingual

时间秒杀一切 提交于 2019-11-28 21:38:32
I've installed a MediaWiki site. I think default MediaWiki supports only one language which is configured during installation. Is there a way in MediaWiki to support two or more languages like wikipedia.org? Available languages for a page should be listed on left side like Wikipedia, and when a user clicks a language, the version of the page in the selected language can be seen. What is the conventional way to support multilingualism? There are two different ways to make a multilingual wiki setup. You can have a family of wikis each of which supports a different language. This is how the

How to remove the language identifier from django-cms 2.4 URLs?

ぐ巨炮叔叔 提交于 2019-11-28 21:24:55
I have followed the tutorial to make a new Django-CMS (2.4) site. I am only using a single language (English). There is an automatic redirect to include the language identifier '/en/' in my site's URLs. How do I remove it? thanks. replace this pattern registration: urlpatterns = i18n_patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^', include('cms.urls')), ) with this: from django.conf.urls import patterns urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^', include('cms.urls')), ) The tutorial you pointed to uses the i18n_patterns method which does

Codeigniter language

 ̄綄美尐妖づ 提交于 2019-11-28 19:59:11
I wanna make a multilanguage website, but I do not want that the language appear in URI like example.com/fr/about (I do not want this). I just want to change the text language. My problem is that the first load language that I do is for ever. why? If I do: $this->config->set_item(‘language’,‘english’); $this->lang->load(‘messages’); $this->config->set_item(‘language’,‘french’); $this->lang->load(‘messages’); or $this->lang->load(‘messages’,‘english’); $this->lang->load(‘messages’,‘french’); just the english appear. How can I fix this? My config language autoload is empty. Thank you for your

MySQL collation to store multilingual data of unknown language

不想你离开。 提交于 2019-11-28 19:43:02
I am new to multilingual data and my confession is that I never did tried it before. Currently I am working on a multilingual site, but I do not know which language will be used. Which collation/character set of MySQL should I use to achieve this? Should I use some Unicode type of character set? And of course these languages are not out of this universe, these must be in the set which we mostly use. mariana soffer You should use a Unicode collation. You can set it by default on your system, or on each field of your tables. There are the following Unicode collation names, and this are their