Modified moment locale for bootstrapMaterialDatePicker - bootstrap-datepicker

hi i want change my moment english locale to french i modified my file bootstrapMaterialDatePicker.js but dosn't work
moment.locale('fr');

I'm using the bootstrapMaterialDatePicker from here:
https://github.com/T00rk/bootstrap-material-datetimepicker
And what I did was to add moment.js, also with moment-with-locales.min.js, and then for it to be applied to the bootstrapMaterialDatePicker you should pass the options like this:
$('#datepicker').bootstrapMaterialDatePicker({
format : 'DD-MM-YYYY',
lang : 'nl'
});
Then that will get the moment-locales.js file and put the correct language to it.
Hope this helps.

Related

Behavior QT translate tr() method with arguments (%1)

Will dynamic translation work for such a code:
const QString myText = tr("%1 Hello World").arg(someVar);
I have few doubts:
1: Will the translation entry be generated for above code (when running lupdate). If yes, will the "%1" argument part be ignored?
2: Is the above code correct ? Should the dynamic part be translated separately before using it in the argument with tr. Provided we know all possible value of someVar
When your run lupdate, you will see this in your .ts file:
<source>%1 Hello World</source>
The translator will need to know they can just ignore the '%1' part.
If someVar is a number, there is no need to do anything else. If it's a string, it will need to be translated separately.

How to save file into a path containing special characters such as '&'? ('&' which is different from '&' typed in English Keyboard)

I need to write out a file to a certain path that contains a special character in R. the path is something like this: C:/Users/Technology & Innovation/Webscraping files/US_data/data
It works totally fine when I access this path through python, but I cannot access the same path in R. And I cannot change this path name or remove '&' as this path is used by a lot of people. Does anyone have a good idea on how to solve it?
I found out it is '&' which has subtle difference from '&' that we usually type in through English Keyboard. May be that's the reason causing the problem?
Here is what I have tried:
write.csv(df, 'C:/Users/Technology & Innovation/Webscraping files/US_data/data/file.csv').
write.csv(df, 'C:\\Users\\Technology & Innovation\\Webscraping files\\US_data/data/file.csv')
Not matter whether I try to read or write a file, it is not working in my case.
I also tried reset the working directory path and got the error message:
Error in setwd("C:/Users/Technology & Innovation/Webscraping files/US_data/data") : cannot change working directory
Write it like this
C:\\Users\\Technology & Innovation\\Webscraping files\\US_data\\data
also, you can change your current directory.
Changing your current directory will help you because you can write read.csv("filename.csv") or write.csv(name_of_file, "filename.csv") as it is without mentioning path.
If you have to write a file you have to use syntax properly.
write.csv(C:\\Users\\Technology & Innovation\\Webscraping files\\US_data\\data,"filename.csv")

Symfony2 translation pluralization arabic language

I have a problem with pluralization translation in symfony2 in my arabic yaml file.
I can't write interval correctly it always shuffle and give me error. I don't seem to find a way to write the sentence correcty because it always changes after I add a number and it become like this شخص|]1,Inf] أشخاص
please help me am really stuck!
recent: الأحدث
popular: الأكثر شعبية
Next: التالي
January: يناير
February: فبراير
March: مارس
April: أبريل
May: ماي
June: يونيو
July: يوليوز
August: غشت
September: شتنبر
October: أكتوبر
November: نونبر
December: دجنبر
You: أنتم
And: و
PERSON: شخص واحد
PERSONS: أشخاص
PERSON_PERSONS: شخص|]1,Inf] أشخاص
Print: طباعة
Thanks ferdynator i found the mistake i was making it's not about the letters shuffling it got interpreted , the problem was that i didn't manage all cases of pluralization i should add case {1}, solved!

open graph image url problems with converted special chars XKB Symbols

I try to use the like-Button and therefor the open graph.
My problem is, that "&" and "$" chars are always replaced by & and %24
Of course, thats the normal case, but I need a clean $ and no entity there, becuase otherwise the link is not working for this image.
I could see, that facebook´s raw output produces \u0024 and so on (seems to be XKBSymbols). But if I try to put this symbols in the link in my typo3 meta-tag, it doesnt work either.
I already tried:
#page.headerData.12345.htmlSpecialChars = 0
#page.headerData.12345.htmlSpecialChars.preserveEntities = 1
#page.headerData.12345.rawUrlEncode = 0
to solve this problem, but none of those work.
Please give me a useful hint.
Thanks
try to write to your php code trough htmlspecialchar php function and add it to header with
$GLOBALS['TSFE']->additionalHeaderData['somekey'] = '...'

$ sign after each line in files(UNIX OS)

I am new to vim editor and based on general reading from different forums, I was trying to customize vim by updating the .vimrc file to look something like this:
syntax on
set incsearch
set ignorecase
set smartcase
set wildmode = list
that gives me a whole set of functionality I need. However, after having saved this content to .vimrc, suddenly all my files started to show $ as the ending character after each line.
i.e. Now even the .vimrc file looks like:
syntax on$
set incsearch$
set ignorecase$
set smartcase$
set wildmode = list$
and unfortunately I am not able to delete them in the editor. Are there any comments on how to get rid of these '$' signs? Has anyone else encountered this problem before?
Thanks in advance!
The line set wildmode = list is wrong, it should be set wildmode=list no spaces.
The line as it is queries the wildmode option and sets the boolean list option
It’s because you said set list.
Go check for init.vim file.
For me that file was at /home/user/.config/nvim/init.vim
And it was turn on "See invisible characters":
set list listchars=tab:>\ ,trial:+,eol:&
Delete or comment the line.

Resources